From: Jarkko Hietaniemi Date: Wed, 2 Aug 2000 22:42:58 +0000 (+0000) Subject: Generate OP_IS_SOCKET() and OP_IS_FILETEST() macros X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a85d93d9d5c06911d843f281439a8d3e65aeb165;p=p5sagit%2Fp5-mst-13.2.git Generate OP_IS_SOCKET() and OP_IS_FILETEST() macros that are hopefully soon put into use. p4raw-id: //depot/perl@6498 --- diff --git a/opcode.pl b/opcode.pl index 1c1d9bf..ab98824 100755 --- a/opcode.pl +++ b/opcode.pl @@ -193,6 +193,9 @@ END '}', 13, # loopexop ); +my %OP_IS_SOCKET; +my %OP_IS_FILETEST; + for (@ops) { $argsum = 0; $flags = $flags{$_}; @@ -210,7 +213,12 @@ for (@ops) { $argsum |= $opclass{$1} << 9; $mul = 0x2000; # 2 ^ OASHIFT for $arg (split(' ',$args{$_})) { + if ($arg =~ /^F/) { + $OP_IS_SOCKET{$_} = 1 if $arg =~ s/s//; + $OP_IS_FILETEST{$_} = 1 if $arg =~ s/-//; + } $argnum = ($arg =~ s/\?//) ? 8 : 0; + die "op = $_, arg = $arg\n" unless length($arg) == 1; $argnum += $argnum{$arg}; warn "# Conflicting bit 32 for '$_'.\n" if $argnum & 8 and $mul == 0x10000000; @@ -228,6 +236,20 @@ print <