Sort keys on hashes during undefined search, in order to make the script more deterministic.
Unified · Split
| @@ -775,6 +775,8 @@ sub check_undefined_symbols { · 774 unmodified lines | ||
| 775 | 775 | my $next_i = 0; |
| 776 | 776 | my $start_time = times; |
| 777 | 777 | |
| 778 | + @files = sort @files; | |
| 779 | + | |
| 778 | 780 | my $last_time = $start_time; |
| 779 | 781 | |
| 780 | 782 | # When either debug or hint is enabled, there's no sense showing |
| @@ -909,16 +911,16 @@ sub undefined_symbols { · 128 unmodified lines | ||
| 909 | 911 | } |
| 910 | 912 | } |
| 911 | 913 | # Compile regexes |
| 912 | − foreach my $l (keys %leaf) { | |
| 914 | + foreach my $l (sort keys %leaf) { | |
| 913 | 915 | my @expr; |
| 914 | − foreach my $w(split /\xac/, $leaf{$l}->{what}) { | |
| 916 | + foreach my $w(sort split /\xac/, $leaf{$l}->{what}) { | |
| 915 | 917 | push @expr, qr /^$w$/; |
| 916 | 918 | } |
| 917 | 919 | $leaf{$l}->{expr} = \@expr; |
| 918 | 920 | } |
| 919 | 921 | |
| 920 | 922 | # Take links into account |
| 921 | − foreach my $link (keys %aliases) { | |
| 923 | + foreach my $link (sort keys %aliases) { | |
| 922 | 924 | my $abs_file = $aliases{$link}; |
| 923 | 925 | graph_add_link($abs_file, $link); |
| 924 | 926 | } |