X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=bytecode.pl;h=cad64bc24fe7c2ac6ddd31b84b105238e818f03a;hb=4ccfbf6061307d91135312f945a81488f8437689;hp=11e148cda7f4702173a7bb888d10e11573e89fdc;hpb=0791085825e06feaaac4987cfea56ad1aa801a7e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/bytecode.pl b/bytecode.pl index 11e148c..cad64bc 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -14,7 +14,8 @@ my @optype= qw(OP UNOP BINOP LOGOP LISTOP PMOP SVOP PADOP PVOP LOOP COP); # Nullsv *must* come first in the following so that the condition # ($$sv == 0) can continue to be used to test (sv == Nullsv). -my @specialsv = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no pWARN_ALL pWARN_NONE); +my @specialsv = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no + (SV*)pWARN_ALL (SV*)pWARN_NONE (SV*)pWARN_STD); my (%alias_from, $from, $tos); while (($from, $tos) = each %alias_to) { @@ -89,7 +90,10 @@ for ($i = 0; $i < @optype - 1; $i++) { printf BYTERUN_C " sizeof(%s),\n", $optype[$i], $i; } printf BYTERUN_C " sizeof(%s)\n", $optype[$i], $i; -print BYTERUN_C <<'EOT'; + +my $size = @specialsv; + +print BYTERUN_C <<"EOT"; }; void * @@ -109,7 +113,7 @@ byterun(pTHX_ register struct byteloader_state *bstate) dVAR; register int insn; U32 ix; - SV *specialsv_list[6]; + SV *specialsv_list[$size]; BYTECODE_HEADER_CHECK; /* croak if incorrect platform */ Newx(bstate->bs_obj_list, 32, void*); /* set op objlist */ @@ -444,7 +448,7 @@ gp_refcnt_add GvREFCNT(bstate->bs_sv) I32 x gp_av *(SV**)&GvAV(bstate->bs_sv) svindex gp_hv *(SV**)&GvHV(bstate->bs_sv) svindex gp_cv *(SV**)&GvCV(bstate->bs_sv) svindex -gp_file GvFILE(bstate->bs_sv) pvindex +gp_file bstate->bs_sv pvindex x gp_io *(SV**)&GvIOp(bstate->bs_sv) svindex gp_form *(SV**)&GvFORM(bstate->bs_sv) svindex gp_cvgen GvCVGEN(bstate->bs_sv) U32 @@ -495,8 +499,7 @@ cop_filegv cCOP svindex x cop_seq cCOP->cop_seq U32 cop_arybase cCOP I32 x cop_line cCOP->cop_line line_t -cop_io cCOP->cop_io svindex -cop_warnings cCOP->cop_warnings svindex +cop_warnings cCOP svindex x main_start PL_main_start opindex main_root PL_main_root opindex main_cv *(SV**)&PL_main_cv svindex