X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=bytecode.pl;h=e3104af7319c7ae575a9c6285aad54d118c8fe77;hb=75d1b5dfc310050618a644104f03818db57b4915;hp=1f30d9be3b7e80cfe1414461ad0f87625c2895bd;hpb=566ece0335f7c1c203117322dd2c63793a5c0397;p=p5sagit%2Fp5-mst-13.2.git diff --git a/bytecode.pl b/bytecode.pl index 1f30d9b..e3104af 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -46,7 +46,7 @@ open(ASMDATA_PM, ">ext/B/B/Asmdata.pm") or die "ext/B/B/Asmdata.pm: $!"; print ASMDATA_PM $perl_header, <<'EOT'; package B::Asmdata; -our $VERSION = '1.00'; +our $VERSION = '1.01'; use Exporter; @ISA = qw(Exporter); @@ -143,6 +143,10 @@ while () { 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 () { 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 @@ -486,7 +492,7 @@ push_end PL_endav svindex x curstash *(SV**)&PL_curstash svindex defstash *(SV**)&PL_defstash svindex data none U8 x -incav *(SV**)&PL_incgv svindex +incav *(SV**)&GvAV(PL_incgv) svindex load_glob none svindex x #ifdef USE_ITHREADS regex_padav *(SV**)&PL_regex_padav svindex