This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[5.004_71] Patch: svr4 hints updates for Unixware
[perl5.git] / opcode.pl
index b3405b7..fe6e202 100755 (executable)
--- a/opcode.pl
+++ b/opcode.pl
@@ -77,6 +77,7 @@ print <<END;
 };
 #endif
 
+#ifndef PERL_OBJECT
 START_EXTERN_C
 
 END
@@ -98,11 +99,13 @@ for (@ops) {
 print <<END;
 
 END_EXTERN_C
+#endif /* PERL_OBJECT */
 
 #ifndef DOINIT
-EXT OP * (*ppaddr[])(ARGSproto);
+EXT OP * (CPERLscope(*ppaddr)[])(ARGSproto);
 #else
-EXT OP * (*ppaddr[])(ARGSproto) = {
+#ifndef PERL_OBJECT
+EXT OP * (CPERLscope(*ppaddr)[])(ARGSproto) = {
 END
 
 for (@ops) {
@@ -111,6 +114,7 @@ for (@ops) {
 
 print <<END;
 };
+#endif /* PERL_OBJECT */
 #endif
 
 END
@@ -119,9 +123,10 @@ END
 
 print <<END;
 #ifndef DOINIT
-EXT OP * (*check[]) _((OP *op));
+EXT OP * (CPERLscope(*check)[]) _((OP *op));
 #else
-EXT OP * (*check[]) _((OP *op)) = {
+#ifndef PERL_OBJECT
+EXT OP * (CPERLscope(*check)[]) _((OP *op)) = {
 END
 
 for (@ops) {
@@ -130,6 +135,7 @@ for (@ops) {
 
 print <<END;
 };
+#endif /* PERL_OBJECT */
 #endif
 
 END
@@ -201,6 +207,16 @@ print <<END;
 #endif
 END
 
+close OC or die "Error closing opcode.h: $!";
+
+open PP, '>pp_proto.h' or die "Error creating pp_proto.h: $!";
+for (@ops) {
+    next if /^i_(pre|post)(inc|dec)$/;
+    print PP "PPDEF(pp_$_)\n";
+}
+
+close PP or die "Error closing pp_proto.h: $!";
+
 ###########################################################################
 sub tab {
     local($l, $t) = @_;
@@ -241,8 +257,8 @@ av2arylen   array length            ck_null         is1
 rv2cv          subroutine deref        ck_rvconst      d1
 anoncode       anonymous subroutine    ck_anoncode     $       
 prototype      subroutine prototype    ck_null         s%      S
-refgen         reference constructor   ck_spair        m0      L
-srefgen                scalar ref constructor  ck_null         fs0     S
+refgen         reference constructor   ck_spair        m1      L
+srefgen                scalar ref constructor  ck_null         fs1     S
 ref            reference-type operator ck_fun          stu%    S?
 bless          bless                   ck_fun          s@      S S?
 
@@ -362,7 +378,7 @@ abs         abs                     ck_fun          fstu%   S?
 # String stuff.
 
 length         length                  ck_lengthconst  istu%   S?
-substr         substr                  ck_fun          st@     S S S?
+substr         substr                  ck_fun          st@     S S S? S?
 vec            vec                     ck_fun          ist@    S S S
 
 index          index                   ck_index        ist@    S S S?
@@ -681,4 +697,4 @@ syscall             syscall                 ck_fun          imst@   S L
 
 # For multi-threading
 lock           lock                    ck_rfun         s%      S
-specific       thread-specific         ck_null         ds0
+threadsv       per-thread variable     ck_null         ds0