X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=bytecode.pl;h=d1e1c708c0dc10cede8cd442be5ea4df4b261e27;hb=9ec58fb7ec19e41fee2f2944750a45a2a85e4a03;hp=030d1eab525500778c05e4f51e5ac1bacd3937f8;hpb=f6b3007c38a92f48d086a19ea8682dd935b6d4ee;p=p5sagit%2Fp5-mst-13.2.git diff --git a/bytecode.pl b/bytecode.pl index 030d1ea..d1e1c70 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -9,7 +9,7 @@ my %alias_to = ( U8 => [qw(char)], ); -my @optype= qw(OP UNOP BINOP LOGOP CONDOP LISTOP PMOP SVOP GVOP PVOP LOOP COP); +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). @@ -47,7 +47,7 @@ package B::Asmdata; use Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name); -use vars qw(%insn_data @insn_name @optype @specialsv_name); +our(%insn_data, @insn_name, @optype, @specialsv_name); EOT print ASMDATA_PM <<"EOT"; @@ -65,6 +65,7 @@ EOT open(BYTERUN_C, ">ext/ByteLoader/byterun.c") or die "ext/ByteLoader/byterun.c: $!"; print BYTERUN_C $c_header, <<'EOT'; +#define PERL_NO_GET_CONTEXT #include "EXTERN.h" #include "perl.h" #define NO_XSLOCKS @@ -207,7 +208,6 @@ struct bytestream { enum { EOT -my $i = 0; my $add_enum_value = 0; my $max_insn; for ($i = 0; $i < @insn_name; $i++) { @@ -234,7 +234,7 @@ for ($i = 0; $i < @optype - 1; $i++) { printf BYTERUN_H " OPt_%s\t\t/* %d */\n};\n\n", $optype[$i], $i; print BYTERUN_H <<'EOT'; -EXT void byterun(pTHXo_ struct bytestream bs); +extern void byterun(pTHXo_ struct bytestream bs); #define INIT_SPECIALSV_LIST STMT_START { \ EOT @@ -313,7 +313,7 @@ xrv SvRV(bytecode_sv) svindex xpv bytecode_sv none x xiv32 SvIVX(bytecode_sv) I32 xiv64 SvIVX(bytecode_sv) IV64 -xnv SvNVX(bytecode_sv) double +xnv SvNVX(bytecode_sv) NV xlv_targoff LvTARGOFF(bytecode_sv) STRLEN xlv_targlen LvTARGLEN(bytecode_sv) STRLEN xlv_targ LvTARG(bytecode_sv) svindex @@ -339,11 +339,11 @@ xcv_stash *(SV**)&CvSTASH(bytecode_sv) svindex xcv_start CvSTART(bytecode_sv) opindex xcv_root CvROOT(bytecode_sv) opindex xcv_gv *(SV**)&CvGV(bytecode_sv) svindex -xcv_filegv *(SV**)&CvFILEGV(bytecode_sv) svindex +xcv_file CvFILE(bytecode_sv) pvcontents xcv_depth CvDEPTH(bytecode_sv) long xcv_padlist *(SV**)&CvPADLIST(bytecode_sv) svindex xcv_outside *(SV**)&CvOUTSIDE(bytecode_sv) svindex -xcv_flags CvFLAGS(bytecode_sv) U8 +xcv_flags CvFLAGS(bytecode_sv) U16 av_extend bytecode_sv SSize_t x av_push bytecode_sv svindex x xav_fill AvFILLp(bytecode_sv) SSize_t @@ -366,7 +366,7 @@ gp_refcnt_add GvREFCNT(bytecode_sv) I32 x gp_av *(SV**)&GvAV(bytecode_sv) svindex gp_hv *(SV**)&GvHV(bytecode_sv) svindex gp_cv *(SV**)&GvCV(bytecode_sv) svindex -gp_filegv *(SV**)&GvFILEGV(bytecode_sv) svindex +gp_file GvFILE(bytecode_sv) pvcontents gp_io *(SV**)&GvIOp(bytecode_sv) svindex gp_form *(SV**)&GvFORM(bytecode_sv) svindex gp_cvgen GvCVGEN(bytecode_sv) U32 @@ -384,8 +384,6 @@ op_private PL_op->op_private U8 op_first cUNOP->op_first opindex op_last cBINOP->op_last opindex op_other cLOGOP->op_other opindex -op_true cCONDOP->op_true opindex -op_false cCONDOP->op_false opindex op_children cLISTOP->op_children U32 op_pmreplroot cPMOP->op_pmreplroot opindex op_pmreplrootgv *(SV**)&cPMOP->op_pmreplroot svindex @@ -395,18 +393,18 @@ pregcomp PL_op pvcontents x op_pmflags cPMOP->op_pmflags U16 op_pmpermflags cPMOP->op_pmpermflags U16 op_sv cSVOP->op_sv svindex -op_gv *(SV**)&cGVOP->op_gv svindex +op_padix cPADOP->op_padix PADOFFSET op_pv cPVOP->op_pv pvcontents op_pv_tr cPVOP->op_pv op_tr_array op_redoop cLOOP->op_redoop opindex op_nextop cLOOP->op_nextop opindex op_lastop cLOOP->op_lastop opindex cop_label cCOP->cop_label pvcontents -cop_stash *(SV**)&cCOP->cop_stash svindex -cop_filegv *(SV**)&cCOP->cop_filegv svindex +cop_stashpv cCOP pvcontents x +cop_file cCOP pvcontents x cop_seq cCOP->cop_seq U32 cop_arybase cCOP->cop_arybase I32 -cop_line cCOP->cop_line line_t +cop_line cCOP line_t x cop_warnings cCOP->cop_warnings svindex main_start PL_main_start opindex main_root PL_main_root opindex