summaryrefslogtreecommitdiff
path: root/opcode.pl
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-07 05:18:34 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-07 05:18:34 +0000
commit864dbfa3ca8032ef66f7aa86961933b19b962357 (patch)
tree4186157b2fc82346ec83e789b065a908a56c1641 /opcode.pl
parentfdf134946da249a71c49962435817212b8fa195a (diff)
downloadperl-864dbfa3ca8032ef66f7aa86961933b19b962357.tar.gz
initial stub implementation of implicit thread/this
pointer argument; builds/tests on Solaris, win32 hasn't been fixed up yet; proto.h, global.sym and static function decls are now generated from a common database in proto.pl; some inconsistently named perl_foo() things are now Perl_foo(), compatibility #defines provided; perl_foo() (lowercase 'p') reserved for functions that take an explicit context argument; next step: generate #define foo(a,b) Perl_foo(aTHX_ a,b) p4raw-id: //depot/perl@3522
Diffstat (limited to 'opcode.pl')
-rwxr-xr-xopcode.pl24
1 files changed, 12 insertions, 12 deletions
diff --git a/opcode.pl b/opcode.pl
index 7ca580b744..b9b0b8aaa3 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -29,10 +29,10 @@ while (<DATA>) {
$i = 0;
print <<"END";
-#define pp_i_preinc pp_preinc
-#define pp_i_predec pp_predec
-#define pp_i_postinc pp_postinc
-#define pp_i_postdec pp_postdec
+#define Perl_pp_i_preinc Perl_pp_preinc
+#define Perl_pp_i_predec Perl_pp_predec
+#define Perl_pp_i_postinc Perl_pp_postinc
+#define Perl_pp_i_postdec Perl_pp_postdec
typedef enum {
END
@@ -82,8 +82,8 @@ START_EXTERN_C
#undef PERL_CKDEF
#undef PERL_PPDEF
-#define PERL_CKDEF(s) OP *s (OP *o);
-#define PERL_PPDEF(s) OP *s (ARGSproto);
+#define PERL_CKDEF(s) OP *s (pTHX_ OP *o);
+#define PERL_PPDEF(s) OP *s (pTHX_ ARGSproto);
#include "pp_proto.h"
@@ -115,7 +115,7 @@ EXT OP * (CPERLscope(*PL_ppaddr)[])(ARGSproto) = {
END
for (@ops) {
- print "\tpp_$_,\n";
+ print "\tPerl_pp_$_,\n";
}
print <<END;
@@ -134,7 +134,7 @@ EXT OP * (CPERLscope(*PL_check)[]) (OP *op) = {
END
for (@ops) {
- print "\t", &tab(3, "$check{$_},"), "/* $_ */\n";
+ print "\t", &tab(3, "Perl_$check{$_},"), "/* $_ */\n";
}
print <<END;
@@ -218,8 +218,8 @@ open PP, '>pp_proto.h' or die "Error creating pp_proto.h: $!";
open PPSYM, '>pp.sym' or die "Error creating pp.sym: $!";
for (sort keys %ckname) {
- print PP "PERL_CKDEF($_)\n";
- print PPSYM "$_\n";
+ print PP "PERL_CKDEF(Perl_$_)\n";
+ print PPSYM "Perl_$_\n";
#OP *\t", &tab(3,$_),"(OP* o);\n";
}
@@ -227,8 +227,8 @@ print PP "\n\n";
for (@ops) {
next if /^i_(pre|post)(inc|dec)$/;
- print PP "PERL_PPDEF(pp_$_)\n";
- print PPSYM "pp_$_\n";
+ print PP "PERL_PPDEF(Perl_pp_$_)\n";
+ print PPSYM "Perl_pp_$_\n";
}
close PP or die "Error closing pp_proto.h: $!";