Introduces SvREPADTMP(sv) that marks a repad SvIV as a offset
[p5sagit/p5-mst-13.2.git] / opcode.pl
index 3c9ae92..2e08641 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -65,6 +65,16 @@ print <<END;
 
 START_EXTERN_C
 
+#ifdef PERL_CUSTOM_OPS
+#define OP_NAME(o) (o->op_type == OP_CUSTOM ? custom_op_name(o) : \\
+                    PL_op_name[o->op_type])
+#define OP_DESC(o) (o->op_type == OP_CUSTOM ? custom_op_desc(o) : \\
+                    PL_op_desc[o->op_type])
+#else
+#define OP_NAME(o) PL_op_name[o->op_type]
+#define OP_DESC(o) PL_op_desc[o->op_type]
+#endif
+
 #ifndef DOINIT
 EXT char *PL_op_name[];
 #else
@@ -130,7 +140,7 @@ EXT OP * (CPERLscope(*PL_ppaddr)[])(pTHX) = {
 END
 
 for (@ops) {
-    print "\tMEMBER_TO_FPTR(Perl_pp_$_),\n";
+    print "\tMEMBER_TO_FPTR(Perl_pp_$_),\n" unless $_ eq "custom";
 }
 
 print <<END;
@@ -209,7 +219,6 @@ for (@ops) {
     $argsum |= 32 if $flags =~ /I/;            # has corresponding int op
     $argsum |= 64 if $flags =~ /d/;            # danger, unknown side effects
     $argsum |= 128 if $flags =~ /u/;           # defaults to $_
-
     $flags =~ /([\W\d_])/ or die qq[Opcode "$_" has no class indicator];
     $argsum |= $opclass{$1} << 9;
     $mul = 0x2000;                             # 2 ^ OASHIFT
@@ -254,6 +263,9 @@ if (keys %OP_IS_FILETEST) {
 close OC or die "Error closing opcode.h: $!";
 close ON or die "Error closing opnames.h: $!";
 
+chmod 0600, 'opcode.h';  # required by dosish filesystems
+chmod 0600, 'opnames.h'; # required by dosish filesystems
+
 rename 'opcode.h.new', 'opcode.h' or die "renaming opcode.h: $!\n";
 rename 'opnames.h.new', 'opnames.h' or die "renaming opnames.h: $!\n";
 
@@ -288,6 +300,7 @@ print PP "\n\n";
 
 for (@ops) {
     next if /^i_(pre|post)(inc|dec)$/;
+    next if /^custom$/;
     print PP "PERL_PPDEF(Perl_pp_$_)\n";
     print PPSYM "Perl_pp_$_\n";
 }
@@ -295,6 +308,9 @@ for (@ops) {
 close PP or die "Error closing pp_proto.h: $!";
 close PPSYM or die "Error closing pp.sym: $!";
 
+chmod 0600, 'pp_proto.h'; # required by dosish filesystems
+chmod 0600, 'pp.sym';     # required by dosish filesystems
+
 rename 'pp_proto.h.new', 'pp_proto.h' or die "rename pp_proto.h: $!\n";
 rename 'pp.sym.new', 'pp.sym' or die "rename pp.sym: $!\n";
 
@@ -438,7 +454,7 @@ bless               bless                   ck_fun          s@      S S?
 backtick       quoted execution (``, qx)       ck_open         t%      
 # glob defaults its first arg to $_
 glob           glob                    ck_glob         t@      S?
-readline       <HANDLE>                ck_null         t%      
+readline       <HANDLE>                ck_null         t%      F?
 rcatline       append I/O operator     ck_null         t%      
 
 # Bindable operators.
@@ -881,3 +897,5 @@ threadsv    per-thread value        ck_null         ds0
 # Control (contd.)
 setstate       set statement info      ck_null         s;
 method_named   method with known name  ck_null         d$
+
+custom         unknown custom operator         ck_null         0