diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-08-21 13:29:26 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-08-25 11:34:36 +0200 |
commit | 5810a9df535b520e92fdee246a94d22d00cd0aad (patch) | |
tree | 4b9268182995b2c80f37e6e6fca188cf5a783160 /regen | |
parent | a3a88924926dbbb2266637650a9d6c86eb3d54a9 (diff) | |
download | perl-5810a9df535b520e92fdee246a94d22d00cd0aad.tar.gz |
In embed.pl, simplify the code that parses regen/opcodes.
As @embed is sorted later, the order that we add entries to it doesn't matter.
Hence add them immediately, avoiding the need to iterate over the "seen" hash.
Diffstat (limited to 'regen')
-rwxr-xr-x | regen/embed.pl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/regen/embed.pl b/regen/embed.pl index 5be37445e6..681c99cb07 100755 --- a/regen/embed.pl +++ b/regen/embed.pl @@ -92,12 +92,10 @@ open IN, 'regen/opcodes' or die $!; next unless $_; next if /^#/; my (undef, undef, $check) = split /\t+/, $_; - ++$syms{$check}; - } + next if $syms{$check}++; - foreach (keys %syms) { # These are all indirectly referenced by globals.c. - push @embed, ['pR', 'OP *', $_, 'NN OP *o']; + push @embed, ['pR', 'OP *', $check, 'NN OP *o']; } } close IN; |