diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-07-28 11:02:23 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-07-28 11:02:23 +0000 |
commit | b97332e79eae50b3e7d901d7d7afe7197bed99ac (patch) | |
tree | 9ce68a879a9ece2034e436cb362296231df3007e /bytecode.pl | |
parent | cd1fc0d41bb8ca74dfd4944b87b8433706d3558e (diff) | |
download | perl-b97332e79eae50b3e7d901d7d7afe7197bed99ac.tar.gz |
Solaris cc didn't appreciate casting a long to a pointer
with no cast, and lval casts are unportable, so introduce
a rval cast.
p4raw-id: //depot/perl@20261
Diffstat (limited to 'bytecode.pl')
-rw-r--r-- | bytecode.pl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bytecode.pl b/bytecode.pl index d4b40fb263..68167e1050 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -143,6 +143,10 @@ while (<DATA>) { next; } ($insn, $lvalue, $argtype, $flags) = split; + my $rvalcast = ''; + if ($argtype =~ m:(.+)/(.+):) { + ($rvalcast, $argtype) = ("($1)", $2); + } $insn_name[$insn_num] = $insn; $fundtype = $alias_from{$argtype} || $argtype; @@ -162,7 +166,7 @@ while (<DATA>) { print BYTERUN_C "\t\tBSET_OBJ_STORE($lvalue$optarg);\n"; } elsif ($optarg && $lvalue ne "none") { - print BYTERUN_C "\t\t$lvalue = arg;\n"; + print BYTERUN_C "\t\t$lvalue = ${rvalcast}arg;\n"; } print BYTERUN_C "\t\tbreak;\n\t }\n"; @@ -337,6 +341,8 @@ nop none none # ret so that \0-terminated strings can be read properly as bytecode. %number 0 # +# The argtype is either a single type or "rightvaluecast/argtype". +# #opcode lvalue argtype flags # ret none none x @@ -447,7 +453,7 @@ op_pmreplstart cPMOP->op_pmreplstart opindex op_pmnext *(OP**)&cPMOP->op_pmnext opindex #ifdef USE_ITHREADS op_pmstashpv cPMOP->op_pmstashpv pvindex -op_pmreplrootpo (PADOFFSET)cPMOP->op_pmreplroot PADOFFSET +op_pmreplrootpo cPMOP->op_pmreplroot OP*/PADOFFSET #else op_pmstash *(SV**)&cPMOP->op_pmstash svindex op_pmreplrootgv *(SV**)&cPMOP->op_pmreplroot svindex |