From: Gurusamy Sarathy Date: Wed, 22 Jul 1998 01:29:09 +0000 (+0000) Subject: s/PL_sv/PL_bytecode_sv/ etc., so we have unique, case-insensitive X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=92742e379e6f1679633256cac8dcf3be460cfb98;hp=cd661bb69faf0e70cffcc62a2ca9539a1dd6a09d;p=p5sagit%2Fp5-mst-13.2.git s/PL_sv/PL_bytecode_sv/ etc., so we have unique, case-insensitive names p4raw-id: //depot/perl@1616 --- diff --git a/bytecode.h b/bytecode.h index ce84c81..e28dd43 100644 --- a/bytecode.h +++ b/bytecode.h @@ -30,23 +30,23 @@ typedef IV IV64; if (arg) \ bs.freadpv(arg, bs.data); \ else { \ - PL_pv.xpv_pv = 0; \ - PL_pv.xpv_len = 0; \ - PL_pv.xpv_cur = 0; \ + PL_bytecode_pv.xpv_pv = 0; \ + PL_bytecode_pv.xpv_len = 0; \ + PL_bytecode_pv.xpv_cur = 0; \ } \ } STMT_END #else #define BGET_PV(arg) STMT_START { \ BGET_U32(arg); \ if (arg) { \ - New(666, PL_pv.xpv_pv, arg, char); \ - PerlIO_read(fp, PL_pv.xpv_pv, arg); \ - PL_pv.xpv_len = arg; \ - PL_pv.xpv_cur = arg - 1; \ + New(666, PL_bytecode_pv.xpv_pv, arg, char); \ + PerlIO_read(fp, PL_bytecode_pv.xpv_pv, arg); \ + PL_bytecode_pv.xpv_len = arg; \ + PL_bytecode_pv.xpv_cur = arg - 1; \ } else { \ - PL_pv.xpv_pv = 0; \ - PL_pv.xpv_len = 0; \ - PL_pv.xpv_cur = 0; \ + PL_bytecode_pv.xpv_pv = 0; \ + PL_bytecode_pv.xpv_len = 0; \ + PL_bytecode_pv.xpv_cur = 0; \ } \ } STMT_END #endif /* INDIRECT_BGET_MACROS */ @@ -70,7 +70,7 @@ typedef IV IV64; arg = (I32)lo; \ } \ else { \ - PL_iv_overflows++; \ + PL_bytecode_iv_overflows++; \ arg = 0; \ } \ } STMT_END @@ -85,7 +85,7 @@ typedef IV IV64; arg = (char *) ary; \ } while (0) -#define BGET_pvcontents(arg) arg = PL_pv.xpv_pv +#define BGET_pvcontents(arg) arg = PL_bytecode_pv.xpv_pv #define BGET_strconst(arg) STMT_START { \ for (arg = PL_tokenbuf; (*arg = BGET_FGETC()); arg++) /* nothing */; \ arg = PL_tokenbuf; \ @@ -100,7 +100,7 @@ typedef IV IV64; #define BGET_objindex(arg, type) STMT_START { \ U32 ix; \ BGET_U32(ix); \ - arg = (type)PL_obj_list[ix]; \ + arg = (type)PL_bytecode_obj_list[ix]; \ } STMT_END #define BGET_svindex(arg) BGET_objindex(arg, svindex) #define BGET_opindex(arg) BGET_objindex(arg, opindex) @@ -117,22 +117,22 @@ typedef IV IV64; #define BSET_gv_fetchpv(sv, arg) sv = (SV*)gv_fetchpv(arg, TRUE, SVt_PV) #define BSET_gv_stashpv(sv, arg) sv = (SV*)gv_stashpv(arg, TRUE) #define BSET_sv_magic(sv, arg) sv_magic(sv, Nullsv, arg, 0, 0) -#define BSET_mg_pv(mg, arg) mg->mg_ptr = arg; mg->mg_len = PL_pv.xpv_cur +#define BSET_mg_pv(mg, arg) mg->mg_ptr = arg; mg->mg_len = PL_bytecode_pv.xpv_cur #define BSET_sv_upgrade(sv, arg) (void)SvUPGRADE(sv, arg) #define BSET_xpv(sv) do { \ - SvPV_set(sv, PL_pv.xpv_pv); \ - SvCUR_set(sv, PL_pv.xpv_cur); \ - SvLEN_set(sv, PL_pv.xpv_len); \ + SvPV_set(sv, PL_bytecode_pv.xpv_pv); \ + SvCUR_set(sv, PL_bytecode_pv.xpv_cur); \ + SvLEN_set(sv, PL_bytecode_pv.xpv_len); \ } while (0) #define BSET_av_extend(sv, arg) av_extend((AV*)sv, arg) #define BSET_av_push(sv, arg) av_push((AV*)sv, arg) #define BSET_hv_store(sv, arg) \ - hv_store((HV*)sv, PL_pv.xpv_pv, PL_pv.xpv_cur, arg, 0) + hv_store((HV*)sv, PL_bytecode_pv.xpv_pv, PL_bytecode_pv.xpv_cur, arg, 0) #define BSET_pv_free(pv) Safefree(pv.xpv_pv) #define BSET_pregcomp(o, arg) \ ((PMOP*)o)->op_pmregexp = arg ? \ - CALLREGCOMP(arg, arg + PL_pv.xpv_cur, ((PMOP*)o)) : 0 + CALLREGCOMP(arg, arg + PL_bytecode_pv.xpv_cur, ((PMOP*)o)) : 0 #define BSET_newsv(sv, arg) sv = NEWSV(666,0); SvUPGRADE(sv, arg) #define BSET_newop(o, arg) o = (OP*)safemalloc(optype_size[arg]) #define BSET_newopn(o, arg) STMT_START { \ @@ -157,5 +157,5 @@ typedef IV IV64; #define BSET_curpad(pad, arg) pad = AvARRAY(arg) #define BSET_OBJ_STORE(obj, ix) \ - (I32)ix > PL_obj_list_fill ? \ - bset_obj_store(obj, (I32)ix) : (PL_obj_list[ix] = obj) + (I32)ix > PL_bytecode_obj_list_fill ? \ + bset_obj_store(obj, (I32)ix) : (PL_bytecode_obj_list[ix] = obj) diff --git a/bytecode.pl b/bytecode.pl index 945b496..cc096ac 100644 --- a/bytecode.pl +++ b/bytecode.pl @@ -68,14 +68,14 @@ print BYTERUN_C $c_header, <<'EOT'; void * bset_obj_store(void *obj, I32 ix) { - if (ix > PL_obj_list_fill) { - if (PL_obj_list_fill == -1) - New(666, PL_obj_list, ix + 1, void*); + if (ix > PL_bytecode_obj_list_fill) { + if (PL_bytecode_obj_list_fill == -1) + New(666, PL_bytecode_obj_list, ix + 1, void*); else - Renew(PL_obj_list, ix + 1, void*); - PL_obj_list_fill = ix; + Renew(PL_bytecode_obj_list, ix + 1, void*); + PL_bytecode_obj_list_fill = ix; } - PL_obj_list[ix] = obj; + PL_bytecode_obj_list[ix] = obj; return obj; } @@ -121,7 +121,7 @@ while () { if ($flags =~ /x/) { print BYTERUN_C "\t\tBSET_$insn($lvalue$optarg);\n"; } elsif ($flags =~ /s/) { - # Store instructions store to PL_obj_list[arg]. "lvalue" field is rvalue. + # Store instructions store to PL_bytecode_obj_list[arg]. "lvalue" field is rvalue. print BYTERUN_C "\t\tBSET_OBJ_STORE($lvalue$optarg);\n"; } elsif ($optarg && $lvalue ne "none") { @@ -267,122 +267,122 @@ nop none none # ret so that \0-terminated strings can be read properly as bytecode. %number 0 # -#opcode lvalue argtype flags +#opcode lvalue argtype flags # -ret none none x -ldsv PL_sv svindex -ldop PL_op opindex -stsv PL_sv U32 s -stop PL_op U32 s -ldspecsv PL_sv U8 x -newsv PL_sv U8 x -newop PL_op U8 x -newopn PL_op U8 x -newpv none PV -pv_cur PL_pv.xpv_cur STRLEN -pv_free PL_pv none x -sv_upgrade PL_sv char x -sv_refcnt SvREFCNT(PL_sv) U32 -sv_refcnt_add SvREFCNT(PL_sv) I32 x -sv_flags SvFLAGS(PL_sv) U32 -xrv SvRV(PL_sv) svindex -xpv PL_sv none x -xiv32 SvIVX(PL_sv) I32 -xiv64 SvIVX(PL_sv) IV64 -xnv SvNVX(PL_sv) double -xlv_targoff LvTARGOFF(PL_sv) STRLEN -xlv_targlen LvTARGLEN(PL_sv) STRLEN -xlv_targ LvTARG(PL_sv) svindex -xlv_type LvTYPE(PL_sv) char -xbm_useful BmUSEFUL(PL_sv) I32 -xbm_previous BmPREVIOUS(PL_sv) U16 -xbm_rare BmRARE(PL_sv) U8 -xfm_lines FmLINES(PL_sv) I32 -xio_lines IoLINES(PL_sv) long -xio_page IoPAGE(PL_sv) long -xio_page_len IoPAGE_LEN(PL_sv) long -xio_lines_left IoLINES_LEFT(PL_sv) long -xio_top_name IoTOP_NAME(PL_sv) pvcontents -xio_top_gv *(SV**)&IoTOP_GV(PL_sv) svindex -xio_fmt_name IoFMT_NAME(PL_sv) pvcontents -xio_fmt_gv *(SV**)&IoFMT_GV(PL_sv) svindex -xio_bottom_name IoBOTTOM_NAME(PL_sv) pvcontents -xio_bottom_gv *(SV**)&IoBOTTOM_GV(PL_sv) svindex -xio_subprocess IoSUBPROCESS(PL_sv) short -xio_type IoTYPE(PL_sv) char -xio_flags IoFLAGS(PL_sv) char -xcv_stash *(SV**)&CvSTASH(PL_sv) svindex -xcv_start CvSTART(PL_sv) opindex -xcv_root CvROOT(PL_sv) opindex -xcv_gv *(SV**)&CvGV(PL_sv) svindex -xcv_filegv *(SV**)&CvFILEGV(PL_sv) svindex -xcv_depth CvDEPTH(PL_sv) long -xcv_padlist *(SV**)&CvPADLIST(PL_sv) svindex -xcv_outside *(SV**)&CvOUTSIDE(PL_sv) svindex -xcv_flags CvFLAGS(PL_sv) U8 -av_extend PL_sv SSize_t x -av_push PL_sv svindex x -xav_fill AvFILLp(PL_sv) SSize_t -xav_max AvMAX(PL_sv) SSize_t -xav_flags AvFLAGS(PL_sv) U8 -xhv_riter HvRITER(PL_sv) I32 -xhv_name HvNAME(PL_sv) pvcontents -hv_store PL_sv svindex x -sv_magic PL_sv char x -mg_obj SvMAGIC(PL_sv)->mg_obj svindex -mg_private SvMAGIC(PL_sv)->mg_private U16 -mg_flags SvMAGIC(PL_sv)->mg_flags U8 -mg_pv SvMAGIC(PL_sv) pvcontents x -xmg_stash *(SV**)&SvSTASH(PL_sv) svindex -gv_fetchpv PL_sv strconst x -gv_stashpv PL_sv strconst x -gp_sv GvSV(PL_sv) svindex -gp_refcnt GvREFCNT(PL_sv) U32 -gp_refcnt_add GvREFCNT(PL_sv) I32 x -gp_av *(SV**)&GvAV(PL_sv) svindex -gp_hv *(SV**)&GvHV(PL_sv) svindex -gp_cv *(SV**)&GvCV(PL_sv) svindex -gp_filegv *(SV**)&GvFILEGV(PL_sv) svindex -gp_io *(SV**)&GvIOp(PL_sv) svindex -gp_form *(SV**)&GvFORM(PL_sv) svindex -gp_cvgen GvCVGEN(PL_sv) U32 -gp_line GvLINE(PL_sv) line_t -gp_share PL_sv svindex x -xgv_flags GvFLAGS(PL_sv) U8 -op_next PL_op->op_next opindex -op_sibling PL_op->op_sibling opindex -op_ppaddr PL_op->op_ppaddr strconst x -op_targ PL_op->op_targ PADOFFSET -op_type PL_op OPCODE x -op_seq PL_op->op_seq U16 -op_flags PL_op->op_flags U8 -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 -op_pmreplstart cPMOP->op_pmreplstart opindex -op_pmnext *(OP**)&cPMOP->op_pmnext opindex -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_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_seq cCOP->cop_seq U32 -cop_arybase cCOP->cop_arybase I32 -cop_line cCOP->cop_line line_t -main_start PL_main_start opindex -main_root PL_main_root opindex -curpad PL_curpad svindex x +ret none none x +ldsv PL_bytecode_sv svindex +ldop PL_op opindex +stsv PL_bytecode_sv U32 s +stop PL_op U32 s +ldspecsv PL_bytecode_sv U8 x +newsv PL_bytecode_sv U8 x +newop PL_op U8 x +newopn PL_op U8 x +newpv none PV +pv_cur PL_bytecode_pv.xpv_cur STRLEN +pv_free PL_bytecode_pv none x +sv_upgrade PL_bytecode_sv char x +sv_refcnt SvREFCNT(PL_bytecode_sv) U32 +sv_refcnt_add SvREFCNT(PL_bytecode_sv) I32 x +sv_flags SvFLAGS(PL_bytecode_sv) U32 +xrv SvRV(PL_bytecode_sv) svindex +xpv PL_bytecode_sv none x +xiv32 SvIVX(PL_bytecode_sv) I32 +xiv64 SvIVX(PL_bytecode_sv) IV64 +xnv SvNVX(PL_bytecode_sv) double +xlv_targoff LvTARGOFF(PL_bytecode_sv) STRLEN +xlv_targlen LvTARGLEN(PL_bytecode_sv) STRLEN +xlv_targ LvTARG(PL_bytecode_sv) svindex +xlv_type LvTYPE(PL_bytecode_sv) char +xbm_useful BmUSEFUL(PL_bytecode_sv) I32 +xbm_previous BmPREVIOUS(PL_bytecode_sv) U16 +xbm_rare BmRARE(PL_bytecode_sv) U8 +xfm_lines FmLINES(PL_bytecode_sv) I32 +xio_lines IoLINES(PL_bytecode_sv) long +xio_page IoPAGE(PL_bytecode_sv) long +xio_page_len IoPAGE_LEN(PL_bytecode_sv) long +xio_lines_left IoLINES_LEFT(PL_bytecode_sv) long +xio_top_name IoTOP_NAME(PL_bytecode_sv) pvcontents +xio_top_gv *(SV**)&IoTOP_GV(PL_bytecode_sv) svindex +xio_fmt_name IoFMT_NAME(PL_bytecode_sv) pvcontents +xio_fmt_gv *(SV**)&IoFMT_GV(PL_bytecode_sv) svindex +xio_bottom_name IoBOTTOM_NAME(PL_bytecode_sv) pvcontents +xio_bottom_gv *(SV**)&IoBOTTOM_GV(PL_bytecode_sv) svindex +xio_subprocess IoSUBPROCESS(PL_bytecode_sv) short +xio_type IoTYPE(PL_bytecode_sv) char +xio_flags IoFLAGS(PL_bytecode_sv) char +xcv_stash *(SV**)&CvSTASH(PL_bytecode_sv) svindex +xcv_start CvSTART(PL_bytecode_sv) opindex +xcv_root CvROOT(PL_bytecode_sv) opindex +xcv_gv *(SV**)&CvGV(PL_bytecode_sv) svindex +xcv_filegv *(SV**)&CvFILEGV(PL_bytecode_sv) svindex +xcv_depth CvDEPTH(PL_bytecode_sv) long +xcv_padlist *(SV**)&CvPADLIST(PL_bytecode_sv) svindex +xcv_outside *(SV**)&CvOUTSIDE(PL_bytecode_sv) svindex +xcv_flags CvFLAGS(PL_bytecode_sv) U8 +av_extend PL_bytecode_sv SSize_t x +av_push PL_bytecode_sv svindex x +xav_fill AvFILLp(PL_bytecode_sv) SSize_t +xav_max AvMAX(PL_bytecode_sv) SSize_t +xav_flags AvFLAGS(PL_bytecode_sv) U8 +xhv_riter HvRITER(PL_bytecode_sv) I32 +xhv_name HvNAME(PL_bytecode_sv) pvcontents +hv_store PL_bytecode_sv svindex x +sv_magic PL_bytecode_sv char x +mg_obj SvMAGIC(PL_bytecode_sv)->mg_obj svindex +mg_private SvMAGIC(PL_bytecode_sv)->mg_private U16 +mg_flags SvMAGIC(PL_bytecode_sv)->mg_flags U8 +mg_pv SvMAGIC(PL_bytecode_sv) pvcontents x +xmg_stash *(SV**)&SvSTASH(PL_bytecode_sv) svindex +gv_fetchpv PL_bytecode_sv strconst x +gv_stashpv PL_bytecode_sv strconst x +gp_sv GvSV(PL_bytecode_sv) svindex +gp_refcnt GvREFCNT(PL_bytecode_sv) U32 +gp_refcnt_add GvREFCNT(PL_bytecode_sv) I32 x +gp_av *(SV**)&GvAV(PL_bytecode_sv) svindex +gp_hv *(SV**)&GvHV(PL_bytecode_sv) svindex +gp_cv *(SV**)&GvCV(PL_bytecode_sv) svindex +gp_filegv *(SV**)&GvFILEGV(PL_bytecode_sv) svindex +gp_io *(SV**)&GvIOp(PL_bytecode_sv) svindex +gp_form *(SV**)&GvFORM(PL_bytecode_sv) svindex +gp_cvgen GvCVGEN(PL_bytecode_sv) U32 +gp_line GvLINE(PL_bytecode_sv) line_t +gp_share PL_bytecode_sv svindex x +xgv_flags GvFLAGS(PL_bytecode_sv) U8 +op_next PL_op->op_next opindex +op_sibling PL_op->op_sibling opindex +op_ppaddr PL_op->op_ppaddr strconst x +op_targ PL_op->op_targ PADOFFSET +op_type PL_op OPCODE x +op_seq PL_op->op_seq U16 +op_flags PL_op->op_flags U8 +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 +op_pmreplstart cPMOP->op_pmreplstart opindex +op_pmnext *(OP**)&cPMOP->op_pmnext opindex +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_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_seq cCOP->cop_seq U32 +cop_arybase cCOP->cop_arybase I32 +cop_line cCOP->cop_line line_t +main_start PL_main_start opindex +main_root PL_main_root opindex +curpad PL_curpad svindex x diff --git a/byterun.c b/byterun.c index 3d9d892..34beaf4 100644 --- a/byterun.c +++ b/byterun.c @@ -15,14 +15,14 @@ void * bset_obj_store(void *obj, I32 ix) { - if (ix > PL_obj_list_fill) { - if (PL_obj_list_fill == -1) - New(666, PL_obj_list, ix + 1, void*); + if (ix > PL_bytecode_obj_list_fill) { + if (PL_bytecode_obj_list_fill == -1) + New(666, PL_bytecode_obj_list, ix + 1, void*); else - Renew(PL_obj_list, ix + 1, void*); - PL_obj_list_fill = ix; + Renew(PL_bytecode_obj_list, ix + 1, void*); + PL_bytecode_obj_list_fill = ix; } - PL_obj_list[ix] = obj; + PL_bytecode_obj_list[ix] = obj; return obj; } @@ -56,7 +56,7 @@ void byterun(PerlIO *fp) { svindex arg; BGET_svindex(arg); - PL_sv = arg; + PL_bytecode_sv = arg; break; } case INSN_LDOP: /* 2 */ @@ -70,7 +70,7 @@ void byterun(PerlIO *fp) { U32 arg; BGET_U32(arg); - BSET_OBJ_STORE(PL_sv, arg); + BSET_OBJ_STORE(PL_bytecode_sv, arg); break; } case INSN_STOP: /* 4 */ @@ -84,14 +84,14 @@ void byterun(PerlIO *fp) { U8 arg; BGET_U8(arg); - BSET_ldspecsv(PL_sv, arg); + BSET_ldspecsv(PL_bytecode_sv, arg); break; } case INSN_NEWSV: /* 6 */ { U8 arg; BGET_U8(arg); - BSET_newsv(PL_sv, arg); + BSET_newsv(PL_bytecode_sv, arg); break; } case INSN_NEWOP: /* 7 */ @@ -118,486 +118,486 @@ void byterun(PerlIO *fp) { STRLEN arg; BGET_U32(arg); - PL_pv.xpv_cur = arg; + PL_bytecode_pv.xpv_cur = arg; break; } case INSN_PV_FREE: /* 12 */ { - BSET_pv_free(PL_pv); + BSET_pv_free(PL_bytecode_pv); break; } case INSN_SV_UPGRADE: /* 13 */ { char arg; BGET_U8(arg); - BSET_sv_upgrade(PL_sv, arg); + BSET_sv_upgrade(PL_bytecode_sv, arg); break; } case INSN_SV_REFCNT: /* 14 */ { U32 arg; BGET_U32(arg); - SvREFCNT(PL_sv) = arg; + SvREFCNT(PL_bytecode_sv) = arg; break; } case INSN_SV_REFCNT_ADD: /* 15 */ { I32 arg; BGET_I32(arg); - BSET_sv_refcnt_add(SvREFCNT(PL_sv), arg); + BSET_sv_refcnt_add(SvREFCNT(PL_bytecode_sv), arg); break; } case INSN_SV_FLAGS: /* 16 */ { U32 arg; BGET_U32(arg); - SvFLAGS(PL_sv) = arg; + SvFLAGS(PL_bytecode_sv) = arg; break; } case INSN_XRV: /* 17 */ { svindex arg; BGET_svindex(arg); - SvRV(PL_sv) = arg; + SvRV(PL_bytecode_sv) = arg; break; } case INSN_XPV: /* 18 */ { - BSET_xpv(PL_sv); + BSET_xpv(PL_bytecode_sv); break; } case INSN_XIV32: /* 19 */ { I32 arg; BGET_I32(arg); - SvIVX(PL_sv) = arg; + SvIVX(PL_bytecode_sv) = arg; break; } case INSN_XIV64: /* 20 */ { IV64 arg; BGET_IV64(arg); - SvIVX(PL_sv) = arg; + SvIVX(PL_bytecode_sv) = arg; break; } case INSN_XNV: /* 21 */ { double arg; BGET_double(arg); - SvNVX(PL_sv) = arg; + SvNVX(PL_bytecode_sv) = arg; break; } case INSN_XLV_TARGOFF: /* 22 */ { STRLEN arg; BGET_U32(arg); - LvTARGOFF(PL_sv) = arg; + LvTARGOFF(PL_bytecode_sv) = arg; break; } case INSN_XLV_TARGLEN: /* 23 */ { STRLEN arg; BGET_U32(arg); - LvTARGLEN(PL_sv) = arg; + LvTARGLEN(PL_bytecode_sv) = arg; break; } case INSN_XLV_TARG: /* 24 */ { svindex arg; BGET_svindex(arg); - LvTARG(PL_sv) = arg; + LvTARG(PL_bytecode_sv) = arg; break; } case INSN_XLV_TYPE: /* 25 */ { char arg; BGET_U8(arg); - LvTYPE(PL_sv) = arg; + LvTYPE(PL_bytecode_sv) = arg; break; } case INSN_XBM_USEFUL: /* 26 */ { I32 arg; BGET_I32(arg); - BmUSEFUL(PL_sv) = arg; + BmUSEFUL(PL_bytecode_sv) = arg; break; } case INSN_XBM_PREVIOUS: /* 27 */ { U16 arg; BGET_U16(arg); - BmPREVIOUS(PL_sv) = arg; + BmPREVIOUS(PL_bytecode_sv) = arg; break; } case INSN_XBM_RARE: /* 28 */ { U8 arg; BGET_U8(arg); - BmRARE(PL_sv) = arg; + BmRARE(PL_bytecode_sv) = arg; break; } case INSN_XFM_LINES: /* 29 */ { I32 arg; BGET_I32(arg); - FmLINES(PL_sv) = arg; + FmLINES(PL_bytecode_sv) = arg; break; } case INSN_XIO_LINES: /* 30 */ { long arg; BGET_I32(arg); - IoLINES(PL_sv) = arg; + IoLINES(PL_bytecode_sv) = arg; break; } case INSN_XIO_PAGE: /* 31 */ { long arg; BGET_I32(arg); - IoPAGE(PL_sv) = arg; + IoPAGE(PL_bytecode_sv) = arg; break; } case INSN_XIO_PAGE_LEN: /* 32 */ { long arg; BGET_I32(arg); - IoPAGE_LEN(PL_sv) = arg; + IoPAGE_LEN(PL_bytecode_sv) = arg; break; } case INSN_XIO_LINES_LEFT: /* 33 */ { long arg; BGET_I32(arg); - IoLINES_LEFT(PL_sv) = arg; + IoLINES_LEFT(PL_bytecode_sv) = arg; break; } case INSN_XIO_TOP_NAME: /* 34 */ { pvcontents arg; BGET_pvcontents(arg); - IoTOP_NAME(PL_sv) = arg; + IoTOP_NAME(PL_bytecode_sv) = arg; break; } case INSN_XIO_TOP_GV: /* 36 */ { svindex arg; BGET_svindex(arg); - *(SV**)&IoTOP_GV(PL_sv) = arg; + *(SV**)&IoTOP_GV(PL_bytecode_sv) = arg; break; } case INSN_XIO_FMT_NAME: /* 37 */ { pvcontents arg; BGET_pvcontents(arg); - IoFMT_NAME(PL_sv) = arg; + IoFMT_NAME(PL_bytecode_sv) = arg; break; } case INSN_XIO_FMT_GV: /* 38 */ { svindex arg; BGET_svindex(arg); - *(SV**)&IoFMT_GV(PL_sv) = arg; + *(SV**)&IoFMT_GV(PL_bytecode_sv) = arg; break; } case INSN_XIO_BOTTOM_NAME: /* 39 */ { pvcontents arg; BGET_pvcontents(arg); - IoBOTTOM_NAME(PL_sv) = arg; + IoBOTTOM_NAME(PL_bytecode_sv) = arg; break; } case INSN_XIO_BOTTOM_GV: /* 40 */ { svindex arg; BGET_svindex(arg); - *(SV**)&IoBOTTOM_GV(PL_sv) = arg; + *(SV**)&IoBOTTOM_GV(PL_bytecode_sv) = arg; break; } case INSN_XIO_SUBPROCESS: /* 41 */ { short arg; BGET_U16(arg); - IoSUBPROCESS(PL_sv) = arg; + IoSUBPROCESS(PL_bytecode_sv) = arg; break; } case INSN_XIO_TYPE: /* 42 */ { char arg; BGET_U8(arg); - IoTYPE(PL_sv) = arg; + IoTYPE(PL_bytecode_sv) = arg; break; } case INSN_XIO_FLAGS: /* 43 */ { char arg; BGET_U8(arg); - IoFLAGS(PL_sv) = arg; + IoFLAGS(PL_bytecode_sv) = arg; break; } case INSN_XCV_STASH: /* 44 */ { svindex arg; BGET_svindex(arg); - *(SV**)&CvSTASH(PL_sv) = arg; + *(SV**)&CvSTASH(PL_bytecode_sv) = arg; break; } case INSN_XCV_START: /* 45 */ { opindex arg; BGET_opindex(arg); - CvSTART(PL_sv) = arg; + CvSTART(PL_bytecode_sv) = arg; break; } case INSN_XCV_ROOT: /* 46 */ { opindex arg; BGET_opindex(arg); - CvROOT(PL_sv) = arg; + CvROOT(PL_bytecode_sv) = arg; break; } case INSN_XCV_GV: /* 47 */ { svindex arg; BGET_svindex(arg); - *(SV**)&CvGV(PL_sv) = arg; + *(SV**)&CvGV(PL_bytecode_sv) = arg; break; } case INSN_XCV_FILEGV: /* 48 */ { svindex arg; BGET_svindex(arg); - *(SV**)&CvFILEGV(PL_sv) = arg; + *(SV**)&CvFILEGV(PL_bytecode_sv) = arg; break; } case INSN_XCV_DEPTH: /* 49 */ { long arg; BGET_I32(arg); - CvDEPTH(PL_sv) = arg; + CvDEPTH(PL_bytecode_sv) = arg; break; } case INSN_XCV_PADLIST: /* 50 */ { svindex arg; BGET_svindex(arg); - *(SV**)&CvPADLIST(PL_sv) = arg; + *(SV**)&CvPADLIST(PL_bytecode_sv) = arg; break; } case INSN_XCV_OUTSIDE: /* 51 */ { svindex arg; BGET_svindex(arg); - *(SV**)&CvOUTSIDE(PL_sv) = arg; + *(SV**)&CvOUTSIDE(PL_bytecode_sv) = arg; break; } case INSN_XCV_FLAGS: /* 52 */ { U8 arg; BGET_U8(arg); - CvFLAGS(PL_sv) = arg; + CvFLAGS(PL_bytecode_sv) = arg; break; } case INSN_AV_EXTEND: /* 53 */ { SSize_t arg; BGET_I32(arg); - BSET_av_extend(PL_sv, arg); + BSET_av_extend(PL_bytecode_sv, arg); break; } case INSN_AV_PUSH: /* 54 */ { svindex arg; BGET_svindex(arg); - BSET_av_push(PL_sv, arg); + BSET_av_push(PL_bytecode_sv, arg); break; } case INSN_XAV_FILL: /* 55 */ { SSize_t arg; BGET_I32(arg); - AvFILLp(PL_sv) = arg; + AvFILLp(PL_bytecode_sv) = arg; break; } case INSN_XAV_MAX: /* 56 */ { SSize_t arg; BGET_I32(arg); - AvMAX(PL_sv) = arg; + AvMAX(PL_bytecode_sv) = arg; break; } case INSN_XAV_FLAGS: /* 57 */ { U8 arg; BGET_U8(arg); - AvFLAGS(PL_sv) = arg; + AvFLAGS(PL_bytecode_sv) = arg; break; } case INSN_XHV_RITER: /* 58 */ { I32 arg; BGET_I32(arg); - HvRITER(PL_sv) = arg; + HvRITER(PL_bytecode_sv) = arg; break; } case INSN_XHV_NAME: /* 59 */ { pvcontents arg; BGET_pvcontents(arg); - HvNAME(PL_sv) = arg; + HvNAME(PL_bytecode_sv) = arg; break; } case INSN_HV_STORE: /* 60 */ { svindex arg; BGET_svindex(arg); - BSET_hv_store(PL_sv, arg); + BSET_hv_store(PL_bytecode_sv, arg); break; } case INSN_SV_MAGIC: /* 61 */ { char arg; BGET_U8(arg); - BSET_sv_magic(PL_sv, arg); + BSET_sv_magic(PL_bytecode_sv, arg); break; } case INSN_MG_OBJ: /* 62 */ { svindex arg; BGET_svindex(arg); - SvMAGIC(PL_sv)->mg_obj = arg; + SvMAGIC(PL_bytecode_sv)->mg_obj = arg; break; } case INSN_MG_PRIVATE: /* 63 */ { U16 arg; BGET_U16(arg); - SvMAGIC(PL_sv)->mg_private = arg; + SvMAGIC(PL_bytecode_sv)->mg_private = arg; break; } case INSN_MG_FLAGS: /* 64 */ { U8 arg; BGET_U8(arg); - SvMAGIC(PL_sv)->mg_flags = arg; + SvMAGIC(PL_bytecode_sv)->mg_flags = arg; break; } case INSN_MG_PV: /* 65 */ { pvcontents arg; BGET_pvcontents(arg); - BSET_mg_pv(SvMAGIC(PL_sv), arg); + BSET_mg_pv(SvMAGIC(PL_bytecode_sv), arg); break; } case INSN_XMG_STASH: /* 66 */ { svindex arg; BGET_svindex(arg); - *(SV**)&SvSTASH(PL_sv) = arg; + *(SV**)&SvSTASH(PL_bytecode_sv) = arg; break; } case INSN_GV_FETCHPV: /* 67 */ { strconst arg; BGET_strconst(arg); - BSET_gv_fetchpv(PL_sv, arg); + BSET_gv_fetchpv(PL_bytecode_sv, arg); break; } case INSN_GV_STASHPV: /* 68 */ { strconst arg; BGET_strconst(arg); - BSET_gv_stashpv(PL_sv, arg); + BSET_gv_stashpv(PL_bytecode_sv, arg); break; } case INSN_GP_SV: /* 69 */ { svindex arg; BGET_svindex(arg); - GvSV(PL_sv) = arg; + GvSV(PL_bytecode_sv) = arg; break; } case INSN_GP_REFCNT: /* 70 */ { U32 arg; BGET_U32(arg); - GvREFCNT(PL_sv) = arg; + GvREFCNT(PL_bytecode_sv) = arg; break; } case INSN_GP_REFCNT_ADD: /* 71 */ { I32 arg; BGET_I32(arg); - BSET_gp_refcnt_add(GvREFCNT(PL_sv), arg); + BSET_gp_refcnt_add(GvREFCNT(PL_bytecode_sv), arg); break; } case INSN_GP_AV: /* 72 */ { svindex arg; BGET_svindex(arg); - *(SV**)&GvAV(PL_sv) = arg; + *(SV**)&GvAV(PL_bytecode_sv) = arg; break; } case INSN_GP_HV: /* 73 */ { svindex arg; BGET_svindex(arg); - *(SV**)&GvHV(PL_sv) = arg; + *(SV**)&GvHV(PL_bytecode_sv) = arg; break; } case INSN_GP_CV: /* 74 */ { svindex arg; BGET_svindex(arg); - *(SV**)&GvCV(PL_sv) = arg; + *(SV**)&GvCV(PL_bytecode_sv) = arg; break; } case INSN_GP_FILEGV: /* 75 */ { svindex arg; BGET_svindex(arg); - *(SV**)&GvFILEGV(PL_sv) = arg; + *(SV**)&GvFILEGV(PL_bytecode_sv) = arg; break; } case INSN_GP_IO: /* 76 */ { svindex arg; BGET_svindex(arg); - *(SV**)&GvIOp(PL_sv) = arg; + *(SV**)&GvIOp(PL_bytecode_sv) = arg; break; } case INSN_GP_FORM: /* 77 */ { svindex arg; BGET_svindex(arg); - *(SV**)&GvFORM(PL_sv) = arg; + *(SV**)&GvFORM(PL_bytecode_sv) = arg; break; } case INSN_GP_CVGEN: /* 78 */ { U32 arg; BGET_U32(arg); - GvCVGEN(PL_sv) = arg; + GvCVGEN(PL_bytecode_sv) = arg; break; } case INSN_GP_LINE: /* 79 */ { line_t arg; BGET_U16(arg); - GvLINE(PL_sv) = arg; + GvLINE(PL_bytecode_sv) = arg; break; } case INSN_GP_SHARE: /* 80 */ { svindex arg; BGET_svindex(arg); - BSET_gp_share(PL_sv, arg); + BSET_gp_share(PL_bytecode_sv, arg); break; } case INSN_XGV_FLAGS: /* 81 */ { U8 arg; BGET_U8(arg); - GvFLAGS(PL_sv) = arg; + GvFLAGS(PL_bytecode_sv) = arg; break; } case INSN_OP_NEXT: /* 82 */ diff --git a/embedvar.h b/embedvar.h index 8c4c5de..8394e84 100644 --- a/embedvar.h +++ b/embedvar.h @@ -146,6 +146,11 @@ #define PL_argvoutgv (PL_curinterp->Iargvoutgv) #define PL_basetime (PL_curinterp->Ibasetime) #define PL_beginav (PL_curinterp->Ibeginav) +#define PL_bytecode_iv_overflows (PL_curinterp->Ibytecode_iv_overflows) +#define PL_bytecode_obj_list (PL_curinterp->Ibytecode_obj_list) +#define PL_bytecode_obj_list_fill (PL_curinterp->Ibytecode_obj_list_fill) +#define PL_bytecode_pv (PL_curinterp->Ibytecode_pv) +#define PL_bytecode_sv (PL_curinterp->Ibytecode_sv) #define PL_cddir (PL_curinterp->Icddir) #define PL_compcv (PL_curinterp->Icompcv) #define PL_compiling (PL_curinterp->Icompiling) @@ -189,7 +194,6 @@ #define PL_incgv (PL_curinterp->Iincgv) #define PL_initav (PL_curinterp->Iinitav) #define PL_inplace (PL_curinterp->Iinplace) -#define PL_iv_overflows (PL_curinterp->Iiv_overflows) #define PL_last_proto (PL_curinterp->Ilast_proto) #define PL_lastfd (PL_curinterp->Ilastfd) #define PL_lastsize (PL_curinterp->Ilastsize) @@ -214,8 +218,6 @@ #define PL_modglobal (PL_curinterp->Imodglobal) #define PL_multiline (PL_curinterp->Imultiline) #define PL_mystrk (PL_curinterp->Imystrk) -#define PL_obj_list (PL_curinterp->Iobj_list) -#define PL_obj_list_fill (PL_curinterp->Iobj_list_fill) #define PL_ofmt (PL_curinterp->Iofmt) #define PL_oldlastpm (PL_curinterp->Ioldlastpm) #define PL_oldname (PL_curinterp->Ioldname) @@ -234,7 +236,6 @@ #define PL_preambled (PL_curinterp->Ipreambled) #define PL_preprocess (PL_curinterp->Ipreprocess) #define PL_profiledata (PL_curinterp->Iprofiledata) -#define PL_pv (PL_curinterp->Ipv) #define PL_replgv (PL_curinterp->Ireplgv) #define PL_rightgv (PL_curinterp->Irightgv) #define PL_rsfp (PL_curinterp->Irsfp) @@ -251,7 +252,6 @@ #define PL_strtab (PL_curinterp->Istrtab) #define PL_sub_generation (PL_curinterp->Isub_generation) #define PL_sublex_info (PL_curinterp->Isublex_info) -#define PL_sv (PL_curinterp->Isv) #define PL_sv_arenaroot (PL_curinterp->Isv_arenaroot) #define PL_sv_count (PL_curinterp->Isv_count) #define PL_sv_objcount (PL_curinterp->Isv_objcount) @@ -280,6 +280,11 @@ #define PL_Iargvoutgv PL_argvoutgv #define PL_Ibasetime PL_basetime #define PL_Ibeginav PL_beginav +#define PL_Ibytecode_iv_overflows PL_bytecode_iv_overflows +#define PL_Ibytecode_obj_list PL_bytecode_obj_list +#define PL_Ibytecode_obj_list_fill PL_bytecode_obj_list_fill +#define PL_Ibytecode_pv PL_bytecode_pv +#define PL_Ibytecode_sv PL_bytecode_sv #define PL_Icddir PL_cddir #define PL_Icompcv PL_compcv #define PL_Icompiling PL_compiling @@ -323,7 +328,6 @@ #define PL_Iincgv PL_incgv #define PL_Iinitav PL_initav #define PL_Iinplace PL_inplace -#define PL_Iiv_overflows PL_iv_overflows #define PL_Ilast_proto PL_last_proto #define PL_Ilastfd PL_lastfd #define PL_Ilastsize PL_lastsize @@ -348,8 +352,6 @@ #define PL_Imodglobal PL_modglobal #define PL_Imultiline PL_multiline #define PL_Imystrk PL_mystrk -#define PL_Iobj_list PL_obj_list -#define PL_Iobj_list_fill PL_obj_list_fill #define PL_Iofmt PL_ofmt #define PL_Ioldlastpm PL_oldlastpm #define PL_Ioldname PL_oldname @@ -368,7 +370,6 @@ #define PL_Ipreambled PL_preambled #define PL_Ipreprocess PL_preprocess #define PL_Iprofiledata PL_profiledata -#define PL_Ipv PL_pv #define PL_Ireplgv PL_replgv #define PL_Irightgv PL_rightgv #define PL_Irsfp PL_rsfp @@ -385,7 +386,6 @@ #define PL_Istrtab PL_strtab #define PL_Isub_generation PL_sub_generation #define PL_Isublex_info PL_sublex_info -#define PL_Isv PL_sv #define PL_Isv_arenaroot PL_sv_arenaroot #define PL_Isv_count PL_sv_count #define PL_Isv_objcount PL_sv_objcount diff --git a/interp.sym b/interp.sym index 69c16de..fbbe2a7 100644 --- a/interp.sym +++ b/interp.sym @@ -73,7 +73,7 @@ in_eval incgv initav inplace -iv_overflows +bytecode_iv_overflows sys_intern last_in_gv last_proto @@ -107,8 +107,8 @@ modcount multiline mystrk nrs -obj_list -obj_list_fill +bytecode_obj_list +bytecode_obj_list_fill ofmt ofs ofslen @@ -129,7 +129,7 @@ preambled preambleav preprocess profiledata -pv +bytecode_pv reg_eval_set reg_flags reg_start_tmp @@ -192,7 +192,7 @@ strchop strtab sub_generation sublex_info -sv +bytecode_sv sv_count sv_objcount sv_root diff --git a/intrpvar.h b/intrpvar.h index b4ccc56..dfdcca8 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -201,11 +201,11 @@ PERLVAR(Ithrsv, SV *) /* struct perl_thread for main thread */ PERLVARI(Ithreadnum, U32, 0) /* incremented each thread creation */ #endif /* USE_THREADS */ -PERLVARI(Iiv_overflows, int, 0) /* from bytecode.h */ -PERLVAR(Isv, SV *) -PERLVAR(Ipv, XPV) -PERLVAR(Iobj_list, void **) -PERLVARI(Iobj_list_fill, I32, -1) +PERLVARI(Ibytecode_iv_overflows,int, 0) /* from bytecode.h */ +PERLVAR(Ibytecode_sv, SV *) +PERLVAR(Ibytecode_pv, XPV) +PERLVAR(Ibytecode_obj_list, void **) +PERLVARI(Ibytecode_obj_list_fill, I32, -1) #ifdef PERL_OBJECT PERLVARI(piMem, IPerlMem*, NULL)