X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=opcode.pl;h=5b0933effed06e52a161d9a5f7ca89641638f56c;hb=319cef53be1e4f9b9d5f4c92c429de1b9c0b0640;hp=43d98ae8af50b88832c18866e5c54e4a7515ec32;hpb=22d4bb9ccb8701e68f9243547d7e3a3c55f70908;p=p5sagit%2Fp5-mst-13.2.git diff --git a/opcode.pl b/opcode.pl index 43d98ae..5b0933e 100755 --- a/opcode.pl +++ b/opcode.pl @@ -1,5 +1,6 @@ #!/usr/bin/perl +chmod 0666, "opcode.h", "opnames.h"; unlink "opcode.h", "opnames.h"; open(OC, ">opcode.h") || die "Can't create opcode.h: $!\n"; open(ON, ">opnames.h") || die "Can't create opnames.h: $!\n"; @@ -30,7 +31,7 @@ while () { $i = 0; print <<"END"; -/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! This file is built by opcode.pl from its data. Any changes made here will be lost! */ @@ -43,7 +44,7 @@ print <<"END"; END print ON <<"END"; -/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! This file is built by opcode.pl from its data. Any changes made here will be lost! */ @@ -56,7 +57,9 @@ for (@ops) { } print ON "\t", &tab(3,"OP_max"), "\n"; print ON "} opcode;\n"; -print ON "\n#define MAXO ", scalar @ops, "\n\n"; +print ON "\n#define MAXO ", scalar @ops, "\n"; +print ON "#define OP_phoney_INPUT_ONLY -1\n"; +print ON "#define OP_phoney_OUTPUT_ONLY -2\n\n"; # Emit op names and descriptions. @@ -90,7 +93,7 @@ END for (@ops) { my($safe_desc) = $desc{$_}; - # Have to escape double quotes and escape characters. + # Have to escape double quotes and escape characters. $safe_desc =~ s/(^|[^\\])([\\"])/$1\\$2/g; print qq(\t"$safe_desc",\n); @@ -259,7 +262,7 @@ open PP, '>pp_proto.h' or die "Error creating pp_proto.h: $!"; open PPSYM, '>pp.sym' or die "Error creating pp.sym: $!"; print PP <<"END"; -/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! This file is built by opcode.pl from its data. Any changes made here will be lost! */ @@ -268,7 +271,7 @@ END print PPSYM <<"END"; # -# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is built by opcode.pl from its data. Any changes made here # will be lost! # @@ -596,7 +599,7 @@ orassign logical or assignment (||=) ck_null s| method method lookup ck_method d1 entersub subroutine entry ck_subr dmt1 L leavesub subroutine exit ck_null 1 -leavesublv lvalue subroutine exit ck_null 1 +leavesublv lvalue subroutine return ck_null 1 caller caller ck_fun t% S? warn warn ck_fun imst@ L die die ck_fun dimst@ L @@ -613,7 +616,7 @@ enteriter foreach loop entry ck_null d{ iter foreach loop iterator ck_null 0 enterloop loop entry ck_null d{ leaveloop loop exit ck_null 2 -return return ck_null dm@ L +return return ck_return dm@ L last last ck_null ds} next next ck_null ds} redo redo ck_null ds} @@ -627,7 +630,7 @@ exit exit ck_exit ds% S? # I/O. -open open ck_open ist@ F S? L +open open ck_open ismt@ F S? L close close ck_fun is% F? pipe_op pipe ck_fun is@ F F