diff options
author | Father Chrysostomos <sprout@cpan.org> | 2015-01-03 22:34:28 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2015-01-31 22:03:51 -0800 |
commit | a9f19d0f50fa6980e7bdbcf691d81e40b2669a17 (patch) | |
tree | 3c8a704cf4b3702951650dd2733b13d7bc689930 /regen/opcode.pl | |
parent | 448d2b66f6cf2d5395d6d8d4ae22812b489cb476 (diff) | |
download | perl-a9f19d0f50fa6980e7bdbcf691d81e40b2669a17.tar.gz |
Add OP_IS_INFIX_BIT
A convenience macro that a forthcoming commit will use.
Diffstat (limited to 'regen/opcode.pl')
-rwxr-xr-x | regen/opcode.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/regen/opcode.pl b/regen/opcode.pl index 765816fd50..fe105846d6 100755 --- a/regen/opcode.pl +++ b/regen/opcode.pl @@ -1136,6 +1136,7 @@ my %OP_IS_FILETEST; # /F-/ my %OP_IS_FT_ACCESS; # /F-+/ my %OP_IS_NUMCOMPARE; # /S</ my %OP_IS_DIRHOP; # /Fd/ +my %OP_IS_INFIX_BIT; # /S\|/ my $OCSHIFT = 8; my $OASHIFT = 12; @@ -1165,8 +1166,9 @@ for my $op (@ops) { $OP_IS_FILETEST{$op} = $opnum{$op} if $arg =~ s/-//; $OP_IS_FT_ACCESS{$op} = $opnum{$op} if $arg =~ s/\+//; } - elsif ($arg =~ /^S</) { + elsif ($arg =~ /^S./) { $OP_IS_NUMCOMPARE{$op} = $opnum{$op} if $arg =~ s/<//; + $OP_IS_INFIX_BIT {$op} = $opnum{$op} if $arg =~ s/\|//; } my $argnum = ($arg =~ s/\?//) ? 8 : 0; die "op = $op, arg = $arg\n" @@ -1206,6 +1208,7 @@ gen_op_is_macro( \%OP_IS_FILETEST, 'OP_IS_FILETEST'); gen_op_is_macro( \%OP_IS_FT_ACCESS, 'OP_IS_FILETEST_ACCESS'); gen_op_is_macro( \%OP_IS_NUMCOMPARE, 'OP_IS_NUMCOMPARE'); gen_op_is_macro( \%OP_IS_DIRHOP, 'OP_IS_DIRHOP'); +gen_op_is_macro( \%OP_IS_INFIX_BIT, 'OP_IS_INFIX_BIT'); sub gen_op_is_macro { my ($op_is, $macname) = @_; |