Skip to content
Browse files

B-C-1.04_10

git-svn-id: http://perl-compiler.googlecode.com/svn/trunk@11 ed534f1a-1453-0410-ab30-dfc593a8b23c
  • Loading branch information...
1 parent 085dfc7 commit a692514e89289de57e9323b56a4174c23b1d9465 @rurban committed Jul 28, 2008
Showing with 1,111 additions and 448 deletions.
  1. +5 −1 ByteLoader/ByteLoader.pm
  2. +9 −6 ByteLoader/Makefile.PL
  3. +46 −25 ByteLoader/bytecode.h
  4. +360 −56 ByteLoader/byterun.c
  5. +48 −37 ByteLoader/byterun.h
  6. +11 −5 ByteLoader/jitrun.c
  7. +1 −1 ByteLoader/jitrun.h
  8. +23 −1 Changes
  9. +1 −1 META.yml
  10. +9 −5 Makefile.PL
  11. +108 −41 bytecode.pl
  12. +2 −2 i386.xs
  13. +25 −9 jitcompiler.pl
  14. +48 −39 lib/B/Asmdata.pm
  15. +52 −21 lib/B/Assembler.pm
  16. +112 −53 lib/B/Bytecode.pm
  17. +145 −95 lib/B/C.pm
  18. +14 −2 lib/B/Debug.pm
  19. +5 −5 lib/B/Disassembler.pm
  20. +8 −1 script/disassemble
  21. +25 −20 t/testc.sh
  22. +54 −22 t/testplc.sh
View
6 ByteLoader/ByteLoader.pm
@@ -8,7 +8,11 @@ our $VERSION = '0.06_01';
# on use ByteLoader $ByteLoader::VERSION;
# Fixed with use ByteLoader '$ByteLoader::VERSION';
-XSLoader::load 'ByteLoader', $VERSION;
+if ($] < 5.009 and $VERSION eq '0.06_01') {
+ XSLoader::load 'ByteLoader'; # fake the old backwards compatible version
+} else {
+ XSLoader::load 'ByteLoader', $VERSION;
+}
1;
__END__
View
15 ByteLoader/Makefile.PL
@@ -5,8 +5,9 @@ WriteMakefile(
NAME => 'ByteLoader',
VERSION_FROM => 'ByteLoader.pm',
XSPROTOARG => '-noprototypes',
- OBJECT => 'byterun$(OBJ_EXT) jitrun$(OBJ_EXT) ByteLoader$(OBJ_EXT)',
+ OBJECT => 'byterun$(OBJ_EXT) ByteLoader$(OBJ_EXT)',
);
+# OBJECT => 'byterun$(OBJ_EXT) jitrun$(OBJ_EXT) ByteLoader$(OBJ_EXT)',
sub MY::depend {
my $up = File::Spec->updir;
@@ -19,19 +20,21 @@ sub MY::depend {
$jitcompiler_pl = File::Spec->catdir( '..', 'jitcompiler.pl' );
}
return "
-byterun.c : $bytecode_pl
+byterun.c : $bytecode_pl Makefile
cd $up && \$(PERL) bytecode.pl && cd ByteLoader
-byterun.h : $bytecode_pl
+byterun.h : $bytecode_pl Makefile
cd $up && \$(PERL) bytecode.pl && cd ByteLoader
-jitrun.c : $jitcompiler_pl
+jitrun.c : $jitcompiler_pl Makefile
cd $up && \$(PERL) jitcompiler.pl && cd ByteLoader
-jitrun.h : $jitcompiler_pl
+jitrun.h : $jitcompiler_pl Makefile
cd $up && \$(PERL) jitcompiler.pl && cd ByteLoader
-ByteLoader\$(OBJ_EXT) : byterun.h byterun.c jitrun.c bytecode.h
+ByteLoader.c: byterun.h jitrun.h Makefile
+
+ByteLoader\$(OBJ_EXT) : byterun.h byterun.c jitrun.c bytecode.h Makefile
"
}
View
71 ByteLoader/bytecode.h
@@ -1,19 +1,13 @@
typedef char *pvcontents;
typedef char *strconst;
-typedef U32 PV;
+typedef U32 PV; /* hack */
typedef char *op_tr_array;
typedef int comment_t;
typedef SV *svindex;
typedef OP *opindex;
typedef char *pvindex;
typedef HEK *hekindex;
-#if PERL_VERSION > 8
-#define BSTATE_xpv_pv bstate->bs_pv.xiv_u.xivu_p1
-#else
-#define BSTATE_xpv_pv bstate->bs_pv.xpv_pv
-#endif
-
#define BGET_FREAD(argp, len, nelem) \
bl_read(bstate->bs_fdata,(char*)(argp),(len),(nelem))
#define BGET_FGETC() bl_getc(bstate->bs_fdata)
@@ -48,12 +42,12 @@ typedef HEK *hekindex;
#define BGET_PV(arg) STMT_START { \
BGET_U32(arg); \
if (arg) { \
- Newx(BSTATE_xpv_pv, arg, char); \
- bl_read(bstate->bs_fdata, BSTATE_xpv_pv, arg, 1); \
- bstate->bs_pv.xpv_len = arg; \
- bstate->bs_pv.xpv_cur = arg - 1; \
+ Newx(bstate->bs_pv.xpv_pv, (U32)arg, char); \
+ bl_read(bstate->bs_fdata, bstate->bs_pv.xpv_pv, (U32)arg, 1); \
+ bstate->bs_pv.xpv_len = (U32)arg; \
+ bstate->bs_pv.xpv_cur = (U32)arg - 1; \
} else { \
- BSTATE_xpv_pv = 0; \
+ bstate->bs_pv.xpv_pv = 0; \
bstate->bs_pv.xpv_len = 0; \
bstate->bs_pv.xpv_cur = 0; \
} \
@@ -85,7 +79,7 @@ typedef HEK *hekindex;
arg = (char *) ary; \
} while (0)
-#define BGET_pvcontents(arg) arg = BSTATE_xpv_pv
+#define BGET_pvcontents(arg) arg = bstate->bs_pv.xpv_pv
#define BGET_strconst(arg) STMT_START { \
for (arg = PL_tokenbuf; (*arg = BGET_FGETC()); arg++) /* nothing */; \
arg = PL_tokenbuf; \
@@ -200,19 +194,21 @@ typedef HEK *hekindex;
// see op.c:newPMOP
// arg + bstate->bs_pv.xpv.xpv_cur
+// TODO: use op_pmflags or re->extflags?
+// op_pmflags is just a small subset of re->extflags
#define BSET_pregcomp(o, re) \
STMT_START { \
SV* repointer; \
REGEXP* rx = re ? \
- CALLREGCOMP(aTHX_ re, cPMOP->op_pmflags) : \
+ CALLREGCOMP(aTHX_ re, cPMOPx(o)->op_pmflags) : \
Null(REGEXP*); \
if(av_len((AV*) PL_regex_pad[0]) > -1) { \
repointer = av_pop((AV*)PL_regex_pad[0]); \
cPMOPx(o)->op_pmoffset = SvIV(repointer); \
sv_setiv(repointer,PTR2IV(rx)); \
} else { \
repointer = newSViv(PTR2IV(rx)); \
- av_push(PL_regex_padav,SvREFCNT_inc_simple_NN(repointer)); \
+ av_push(PL_regex_padav, SvREFCNT_inc_simple_NN(repointer)); \
cPMOPx(o)->op_pmoffset = av_len(PL_regex_padav); \
PL_regex_pad = AvARRAY(PL_regex_padav); \
} \
@@ -233,7 +229,7 @@ typedef HEK *hekindex;
#define BSET_pregcomp(o, re) \
STMT_START { \
PM_SETRE(((PMOP*)o), (re ? \
- CALLREGCOMP(aTHX_ re, cPMOP->op_pmflags) : \
+ CALLREGCOMP(aTHX_ re, cPMOPx(o)->op_pmflags) : \
Null(REGEXP*))); \
} STMT_END
#endif
@@ -258,11 +254,12 @@ typedef HEK *hekindex;
BSET_OBJ_STOREX(sv); \
} STMT_END
-#define BSET_newop(o, arg) NewOpSz(666, o, arg)
+#define BSET_newop(o, size) NewOpSz(666, o, size)
+/* arg is encoded as type <<7 and size */
#define BSET_newopx(o, arg) STMT_START { \
- register int sz = arg & 0x7f; \
+ register int size = arg & 0x7f; \
register OP* newop; \
- BSET_newop(newop, sz); \
+ BSET_newop(newop, size); \
/* newop->op_next = o; XXX */ \
o = newop; \
arg >>=7; \
@@ -367,14 +364,31 @@ typedef HEK *hekindex;
#define BSET_cop_stash(cop,arg) CopSTASH_set(cop,(HV*)arg)
#endif
-/* this is simply stolen from the code in newATTRSUB() */
+/* This is stolen from the code in newATTRSUB() */
#if PERL_VERSION < 10
#define PL_HINTS_PRIVATE (PL_hints & HINT_PRIVATE_MASK)
#else
/* Hints are now stored in a dedicated U32, so the bottom 8 bits are no longer
special and there is no need for HINT_PRIVATE_MASK for COPs. */
#define PL_HINTS_PRIVATE (PL_hints)
#endif
+#if PERL_VERSION < 10
+#define BSET_push_begin(ary,cv) \
+ STMT_START { \
+ I32 oldscope = PL_scopestack_ix; \
+ ENTER; \
+ SAVECOPFILE(&PL_compiling); \
+ SAVECOPLINE(&PL_compiling); \
+ if (!PL_beginav) \
+ PL_beginav = newAV(); \
+ av_push(PL_beginav, (SV*)cv); \
+ GvCV(CvGV(cv)) = 0; /* cv has been hijacked */\
+ call_list(oldscope, PL_beginav); \
+ PL_curcop = &PL_compiling; \
+ PL_compiling.op_private = (U8)(PL_hints & HINT_PRIVATE_MASK);\
+ LEAVE; \
+ } STMT_END
+#else
#define BSET_push_begin(ary,cv) \
STMT_START { \
I32 oldscope = PL_scopestack_ix; \
@@ -390,6 +404,7 @@ typedef HEK *hekindex;
CopHINTS_set(&PL_compiling, (U8)PL_HINTS_PRIVATE); \
LEAVE; \
} STMT_END
+#endif
#define BSET_push_init(ary,cv) \
STMT_START { \
av_unshift((PL_initav ? PL_initav : \
@@ -419,6 +434,9 @@ typedef HEK *hekindex;
#define BSET_xhv_name(hv, name) hv_name_set((HV*)hv, name, strlen(name), 0)
#define BSET_cop_arybase(c, b) CopARYBASE_set(c, b)
+#if PERL_VERSION < 10
+#define BSET_cop_warnings(c, w) c->cop_warnings = (STRLEN *)w;
+#else
#define BSET_cop_warnings(c, w) \
STMT_START { \
if (specialWARN((STRLEN *)w)) { \
@@ -431,6 +449,7 @@ typedef HEK *hekindex;
SvREFCNT_dec(w); \
} \
} STMT_END
+#endif
#define BSET_gp_file(gv, file) \
STMT_START { \
STRLEN len = strlen(file); \
@@ -445,13 +464,14 @@ typedef HEK *hekindex;
/* NOTE: The bytecode header only sanity-checks the bytecode. If a script cares about
* what version of Perl it's being called under, it should do a 'use 5.006_001' or
- * equivalent. However, since the header includes checks requiring an exact match in
+ * equivalent. However, since the header includes checks required an exact match in
* ByteLoader versions (we can't guarantee forward compatibility), you don't
- * need to specify one:
+ * need to specify one.
* use ByteLoader;
* is all you need.
* -- BKS, June 2000
-*/
+ * Changed to guarantee backwards compatibility. -- rurban 2008-02
+ */
#define HEADER_FAIL(f) \
Perl_croak(aTHX_ "Invalid bytecode for this architecture: " f)
@@ -477,8 +497,8 @@ typedef HEK *hekindex;
if (strNE(str, ARCHNAME)) { \
HEADER_FAIL2("wrong architecture (want %s, you have %s)",str,ARCHNAME); \
} \
- BGET_strconst(str); /* ByteLoader version */ \
- if (strNE(str, VERSION)) { \
+ BGET_strconst(str); /* fail if lower ByteLoader version */ \
+ if (strLT(str, VERSION)) { \
HEADER_FAIL2("mismatched ByteLoader versions (want %s, you have %s)", \
str, VERSION); \
} \
@@ -496,3 +516,4 @@ typedef HEK *hekindex;
"12345678", str); \
} \
} STMT_END
+
View
416 ByteLoader/byterun.c
@@ -57,14 +57,19 @@ byterun(pTHX_ struct byteloader_state *bstate)
U32 ix;
SV *specialsv_list[7];
- BYTECODE_HEADER_CHECK; /* croak if incorrect platform, set isjit if PLJC magic header */
+ BYTECODE_HEADER_CHECK; /* croak if incorrect platform, set isjit on PLJC magic header */
if (isjit) {
- return jitrun(aTHX_ &bstate);
+ return 0; /*jitrun(aTHX_ &bstate);*/
} else {
Newx(bstate->bs_obj_list, 32, void*); /* set op objlist */
bstate->bs_obj_list_fill = 31;
bstate->bs_obj_list[0] = NULL; /* first is always Null */
bstate->bs_ix = 1;
+#if 0 && (PERL_VERSION > 8)
+ Newx(bstate->bs_sv, sizeof(SV), SV*); /* set sv */
+ bstate->bs_sv->sv_any = &(bstate->bs_pv);
+#endif
+ CopLINE(PL_curcop) = bstate->bs_fdata->next_out;
DEBUG_l( Perl_deb(aTHX_ "(bstate.bs_fdata.idx %d)\n", bstate->bs_fdata->idx));
DEBUG_l( Perl_deb(aTHX_ "(bstate.bs_fdata.next_out %d)\n", bstate->bs_fdata->next_out));
DEBUG_l( Perl_deb(aTHX_ "(bstate.bs_fdata.datasv %p:\"%s\")\n", bstate->bs_fdata->datasv,
@@ -79,1002 +84,1301 @@ byterun(pTHX_ struct byteloader_state *bstate)
specialsv_list[6] = (SV*)pWARN_STD;
while ((insn = BGET_FGETC()) != EOF) {
- DEBUG_l( Perl_deb(aTHX_ "(insn %d)\n", insn));
+ CopLINE(PL_curcop) = bstate->bs_fdata->next_out;
+ if (PL_op && DEBUG_t_TEST_) debop(PL_op);
switch (insn) {
case INSN_COMMENT: /* 35 */
{
comment_t arg;
BGET_comment_t(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) comment comment_t:0x%x\n", insn, arg));
arg = arg;
+ DEBUG_v(Perl_deb(aTHX_ " arg = arg;\n"));
break;
}
case INSN_NOP: /* 10 */
{
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) nop\n", insn));
break;
}
case INSN_RET: /* 0 */
{
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) ret\n", insn));
BSET_ret(none);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_ret(none)\n"));
break;
}
case INSN_LDSV: /* 1 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) ldsv svindex:0x%x\n", insn, arg));
bstate->bs_sv = arg;
+ DEBUG_v(Perl_deb(aTHX_ " bstate->bs_sv = arg;\n"));
break;
}
case INSN_LDOP: /* 2 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) ldop opindex:0x%x\n", insn, arg));
PL_op = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op = arg;\n"));
break;
}
case INSN_STSV: /* 3 */
{
U32 arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) stsv U32:0x%x\n", insn, arg));
BSET_OBJ_STORE(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_OBJ_STORE(bstate->bs_sv, arg)\n"));
break;
}
case INSN_STOP: /* 4 */
{
U32 arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) stop U32:0x%x\n", insn, arg));
BSET_OBJ_STORE(PL_op, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_OBJ_STORE(PL_op, arg)\n"));
break;
}
case INSN_STPV: /* 5 */
{
U32 arg;
BGET_U32(arg);
- BSET_stpv(BSTATE_xpv_pv, arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) stpv U32:0x%x\n", insn, arg));
+ BSET_stpv(bstate->bs_pv.xpv_pv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_stpv(bstate->bs_pv.xpv_pv, arg)\n"));
break;
}
case INSN_LDSPECSV: /* 6 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) ldspecsv U8:0x%x\n", insn, arg));
BSET_ldspecsv(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_ldspecsv(bstate->bs_sv, arg)\n"));
break;
}
case INSN_LDSPECSVX: /* 7 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) ldspecsvx U8:0x%x\n", insn, arg));
BSET_ldspecsvx(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_ldspecsvx(bstate->bs_sv, arg)\n"));
break;
}
case INSN_NEWSV: /* 8 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) newsv U8:0x%x\n", insn, arg));
BSET_newsv(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_newsv(bstate->bs_sv, arg)\n"));
break;
}
case INSN_NEWSVX: /* 9 */
{
U32 arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) newsvx U32:0x%x\n", insn, arg));
BSET_newsvx(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_newsvx(bstate->bs_sv, arg)\n"));
break;
}
case INSN_NEWOP: /* 11 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) newop U8:0x%x\n", insn, arg));
BSET_newop(PL_op, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_newop(PL_op, arg)\n"));
break;
}
case INSN_NEWOPX: /* 12 */
{
U16 arg;
BGET_U16(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) newopx U16:0x%x\n", insn, arg));
BSET_newopx(PL_op, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_newopx(PL_op, arg)\n"));
break;
}
case INSN_NEWOPN: /* 13 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) newopn U8:0x%x\n", insn, arg));
BSET_newopn(PL_op, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_newopn(PL_op, arg)\n"));
break;
}
case INSN_NEWPV: /* 14 */
{
PV arg;
BGET_PV(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) newpv PV:0x%x\n", insn, arg));
break;
}
case INSN_PV_CUR: /* 15 */
{
STRLEN arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) pv_cur STRLEN:0x%x\n", insn, arg));
bstate->bs_pv.xpv_cur = arg;
+ DEBUG_v(Perl_deb(aTHX_ " bstate->bs_pv.xpv_cur = arg;\n"));
break;
}
case INSN_PV_FREE: /* 16 */
{
- BSET_pv_free(BSTATE_xpv_pv);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) pv_free\n", insn));
+ BSET_pv_free(bstate->bs_pv.xpv_pv);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_pv_free(bstate->bs_pv.xpv_pv)\n"));
break;
}
case INSN_SV_UPGRADE: /* 17 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) sv_upgrade U8:0x%x\n", insn, arg));
BSET_sv_upgrade(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_sv_upgrade(bstate->bs_sv, arg)\n"));
break;
}
case INSN_SV_REFCNT: /* 18 */
{
U32 arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) sv_refcnt U32:0x%x\n", insn, arg));
SvREFCNT(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " SvREFCNT(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_SV_REFCNT_ADD: /* 19 */
{
I32 arg;
BGET_I32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) sv_refcnt_add I32:0x%x\n", insn, arg));
BSET_sv_refcnt_add(SvREFCNT(bstate->bs_sv), arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_sv_refcnt_add(SvREFCNT(bstate->bs_sv), arg)\n"));
break;
}
case INSN_SV_FLAGS: /* 20 */
{
U32 arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) sv_flags U32:0x%x\n", insn, arg));
SvFLAGS(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " SvFLAGS(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XRV: /* 21 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xrv svindex:0x%x\n", insn, arg));
BSET_xrv(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_xrv(bstate->bs_sv, arg)\n"));
break;
}
case INSN_XPV: /* 22 */
{
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xpv\n", insn));
BSET_xpv(bstate->bs_sv);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_xpv(bstate->bs_sv)\n"));
break;
}
case INSN_XPV_CUR: /* 23 */
{
STRLEN arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xpv_cur STRLEN:0x%x\n", insn, arg));
BSET_xpv_cur(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_xpv_cur(bstate->bs_sv, arg)\n"));
break;
}
case INSN_XPV_LEN: /* 24 */
{
STRLEN arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xpv_len STRLEN:0x%x\n", insn, arg));
BSET_xpv_len(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_xpv_len(bstate->bs_sv, arg)\n"));
break;
}
case INSN_XIV: /* 25 */
{
IV arg;
BGET_IV(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xiv IV:0x%x\n", insn, arg));
BSET_xiv(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_xiv(bstate->bs_sv, arg)\n"));
break;
}
case INSN_XNV: /* 26 */
{
NV arg;
BGET_NV(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xnv NV:0x%x\n", insn, arg));
BSET_xnv(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_xnv(bstate->bs_sv, arg)\n"));
break;
}
case INSN_XLV_TARGOFF: /* 27 */
{
STRLEN arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xlv_targoff STRLEN:0x%x\n", insn, arg));
LvTARGOFF(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " LvTARGOFF(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XLV_TARGLEN: /* 28 */
{
STRLEN arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xlv_targlen STRLEN:0x%x\n", insn, arg));
LvTARGLEN(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " LvTARGLEN(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XLV_TARG: /* 29 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xlv_targ svindex:0x%x\n", insn, arg));
LvTARG(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " LvTARG(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XLV_TYPE: /* 30 */
{
char arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xlv_type char:0x%x\n", insn, arg));
LvTYPE(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " LvTYPE(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XBM_USEFUL: /* 31 */
{
I32 arg;
BGET_I32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xbm_useful I32:0x%x\n", insn, arg));
BmUSEFUL(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " BmUSEFUL(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XBM_PREVIOUS: /* 32 */
{
U16 arg;
BGET_U16(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xbm_previous U16:0x%x\n", insn, arg));
BmPREVIOUS(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " BmPREVIOUS(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XBM_RARE: /* 33 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xbm_rare U8:0x%x\n", insn, arg));
BmRARE(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " BmRARE(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XFM_LINES: /* 34 */
{
IV arg;
BGET_IV(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xfm_lines IV:0x%x\n", insn, arg));
FmLINES(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " FmLINES(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_LINES: /* 36 */
{
IV arg;
BGET_IV(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_lines IV:0x%x\n", insn, arg));
IoLINES(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " IoLINES(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_PAGE: /* 37 */
{
IV arg;
BGET_IV(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_page IV:0x%x\n", insn, arg));
IoPAGE(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " IoPAGE(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_PAGE_LEN: /* 38 */
{
IV arg;
BGET_IV(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_page_len IV:0x%x\n", insn, arg));
IoPAGE_LEN(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " IoPAGE_LEN(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_LINES_LEFT: /* 39 */
{
IV arg;
BGET_IV(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_lines_left IV:0x%x\n", insn, arg));
IoLINES_LEFT(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " IoLINES_LEFT(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_TOP_NAME: /* 40 */
{
pvindex arg;
BGET_pvindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_top_name pvindex:0x%x\n", insn, arg));
IoTOP_NAME(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " IoTOP_NAME(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_TOP_GV: /* 41 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_top_gv svindex:0x%x\n", insn, arg));
*(SV**)&IoTOP_GV(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&IoTOP_GV(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_FMT_NAME: /* 42 */
{
pvindex arg;
BGET_pvindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_fmt_name pvindex:0x%x\n", insn, arg));
IoFMT_NAME(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " IoFMT_NAME(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_FMT_GV: /* 43 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_fmt_gv svindex:0x%x\n", insn, arg));
*(SV**)&IoFMT_GV(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&IoFMT_GV(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_BOTTOM_NAME: /* 44 */
{
pvindex arg;
BGET_pvindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_bottom_name pvindex:0x%x\n", insn, arg));
IoBOTTOM_NAME(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " IoBOTTOM_NAME(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_BOTTOM_GV: /* 45 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_bottom_gv svindex:0x%x\n", insn, arg));
*(SV**)&IoBOTTOM_GV(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&IoBOTTOM_GV(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_TYPE: /* 46 */
{
char arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_type char:0x%x\n", insn, arg));
IoTYPE(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " IoTYPE(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XIO_FLAGS: /* 47 */
{
char arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xio_flags char:0x%x\n", insn, arg));
IoFLAGS(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " IoFLAGS(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_XSUBANY: /* 48 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_xsubany svindex:0x%x\n", insn, arg));
*(SV**)&CvXSUBANY(bstate->bs_sv).any_ptr = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&CvXSUBANY(bstate->bs_sv).any_ptr = arg;\n"));
break;
}
case INSN_XCV_STASH: /* 49 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_stash svindex:0x%x\n", insn, arg));
*(SV**)&CvSTASH(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&CvSTASH(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_START: /* 50 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_start opindex:0x%x\n", insn, arg));
CvSTART(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " CvSTART(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_ROOT: /* 51 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_root opindex:0x%x\n", insn, arg));
CvROOT(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " CvROOT(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_GV: /* 52 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_gv svindex:0x%x\n", insn, arg));
*(SV**)&CvGV(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&CvGV(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_FILE: /* 53 */
{
pvindex arg;
BGET_pvindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_file pvindex:0x%x\n", insn, arg));
CvFILE(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " CvFILE(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_DEPTH: /* 54 */
{
long arg;
BGET_long(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_depth long:0x%x\n", insn, arg));
CvDEPTH(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " CvDEPTH(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_PADLIST: /* 55 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_padlist svindex:0x%x\n", insn, arg));
*(SV**)&CvPADLIST(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&CvPADLIST(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_OUTSIDE: /* 56 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_outside svindex:0x%x\n", insn, arg));
*(SV**)&CvOUTSIDE(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&CvOUTSIDE(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_OUTSIDE_SEQ: /* 57 */
{
U32 arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_outside_seq U32:0x%x\n", insn, arg));
CvOUTSIDE_SEQ(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " CvOUTSIDE_SEQ(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XCV_FLAGS: /* 58 */
{
U16 arg;
BGET_U16(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xcv_flags U16:0x%x\n", insn, arg));
CvFLAGS(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " CvFLAGS(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_AV_EXTEND: /* 59 */
{
SSize_t arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) av_extend SSize_t:0x%x\n", insn, arg));
BSET_av_extend(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_av_extend(bstate->bs_sv, arg)\n"));
break;
}
case INSN_AV_PUSHX: /* 60 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) av_pushx svindex:0x%x\n", insn, arg));
BSET_av_pushx(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_av_pushx(bstate->bs_sv, arg)\n"));
break;
}
case INSN_AV_PUSH: /* 61 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) av_push svindex:0x%x\n", insn, arg));
BSET_av_push(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_av_push(bstate->bs_sv, arg)\n"));
break;
}
case INSN_XAV_FILL: /* 62 */
{
SSize_t arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xav_fill SSize_t:0x%x\n", insn, arg));
AvFILLp(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " AvFILLp(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XAV_MAX: /* 63 */
{
SSize_t arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xav_max SSize_t:0x%x\n", insn, arg));
AvMAX(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " AvMAX(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_XAV_FLAGS: /* 64 */
{
I32 arg;
BGET_I32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xav_flags I32:0x%x\n", insn, arg));
((XPVAV*)(SvANY(bstate->bs_sv)))->xiv_u.xivu_i32 = arg;
+ DEBUG_v(Perl_deb(aTHX_ " ((XPVAV*)(SvANY(bstate->bs_sv)))->xiv_u.xivu_i32 = arg;\n"));
break;
}
case INSN_XHV_NAME: /* 65 */
{
pvindex arg;
BGET_pvindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xhv_name pvindex:0x%x\n", insn, arg));
BSET_xhv_name(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_xhv_name(bstate->bs_sv, arg)\n"));
break;
}
case INSN_HV_STORE: /* 66 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) hv_store svindex:0x%x\n", insn, arg));
BSET_hv_store(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_hv_store(bstate->bs_sv, arg)\n"));
break;
}
case INSN_SV_MAGIC: /* 67 */
{
char arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) sv_magic char:0x%x\n", insn, arg));
BSET_sv_magic(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_sv_magic(bstate->bs_sv, arg)\n"));
break;
}
case INSN_MG_OBJ: /* 68 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) mg_obj svindex:0x%x\n", insn, arg));
SvMAGIC(bstate->bs_sv)->mg_obj = arg;
+ DEBUG_v(Perl_deb(aTHX_ " SvMAGIC(bstate->bs_sv)->mg_obj = arg;\n"));
break;
}
case INSN_MG_PRIVATE: /* 69 */
{
U16 arg;
BGET_U16(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) mg_private U16:0x%x\n", insn, arg));
SvMAGIC(bstate->bs_sv)->mg_private = arg;
+ DEBUG_v(Perl_deb(aTHX_ " SvMAGIC(bstate->bs_sv)->mg_private = arg;\n"));
break;
}
case INSN_MG_FLAGS: /* 70 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) mg_flags U8:0x%x\n", insn, arg));
SvMAGIC(bstate->bs_sv)->mg_flags = arg;
+ DEBUG_v(Perl_deb(aTHX_ " SvMAGIC(bstate->bs_sv)->mg_flags = arg;\n"));
break;
}
case INSN_MG_NAME: /* 71 */
{
pvcontents arg;
BGET_pvcontents(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) mg_name pvcontents:0x%x\n", insn, arg));
BSET_mg_name(SvMAGIC(bstate->bs_sv), arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_mg_name(SvMAGIC(bstate->bs_sv), arg)\n"));
break;
}
case INSN_MG_NAMEX: /* 72 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) mg_namex svindex:0x%x\n", insn, arg));
BSET_mg_namex(SvMAGIC(bstate->bs_sv), arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_mg_namex(SvMAGIC(bstate->bs_sv), arg)\n"));
break;
}
case INSN_XMG_STASH: /* 73 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xmg_stash svindex:0x%x\n", insn, arg));
BSET_xmg_stash(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_xmg_stash(bstate->bs_sv, arg)\n"));
break;
}
case INSN_GV_FETCHPV: /* 74 */
{
strconst arg;
BGET_strconst(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gv_fetchpv strconst:0x%x\n", insn, arg));
BSET_gv_fetchpv(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_gv_fetchpv(bstate->bs_sv, arg)\n"));
break;
}
case INSN_GV_FETCHPVX: /* 75 */
{
strconst arg;
BGET_strconst(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gv_fetchpvx strconst:0x%x\n", insn, arg));
BSET_gv_fetchpvx(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_gv_fetchpvx(bstate->bs_sv, arg)\n"));
break;
}
case INSN_GV_STASHPV: /* 76 */
{
strconst arg;
BGET_strconst(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gv_stashpv strconst:0x%x\n", insn, arg));
BSET_gv_stashpv(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_gv_stashpv(bstate->bs_sv, arg)\n"));
break;
}
case INSN_GV_STASHPVX: /* 77 */
{
strconst arg;
BGET_strconst(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gv_stashpvx strconst:0x%x\n", insn, arg));
BSET_gv_stashpvx(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_gv_stashpvx(bstate->bs_sv, arg)\n"));
break;
}
case INSN_GP_SV: /* 78 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_sv svindex:0x%x\n", insn, arg));
GvSV(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " GvSV(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_REFCNT: /* 79 */
{
U32 arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_refcnt U32:0x%x\n", insn, arg));
GvREFCNT(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " GvREFCNT(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_REFCNT_ADD: /* 80 */
{
I32 arg;
BGET_I32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_refcnt_add I32:0x%x\n", insn, arg));
BSET_gp_refcnt_add(GvREFCNT(bstate->bs_sv), arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_gp_refcnt_add(GvREFCNT(bstate->bs_sv), arg)\n"));
break;
}
case INSN_GP_AV: /* 81 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_av svindex:0x%x\n", insn, arg));
*(SV**)&GvAV(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&GvAV(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_HV: /* 82 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_hv svindex:0x%x\n", insn, arg));
*(SV**)&GvHV(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&GvHV(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_CV: /* 83 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_cv svindex:0x%x\n", insn, arg));
*(SV**)&GvCV(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&GvCV(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_FILE: /* 84 */
{
hekindex arg;
BGET_hekindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_file hekindex:0x%x\n", insn, arg));
GvFILE_HEK(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " GvFILE_HEK(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_IO: /* 85 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_io svindex:0x%x\n", insn, arg));
*(SV**)&GvIOp(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&GvIOp(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_FORM: /* 86 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_form svindex:0x%x\n", insn, arg));
*(SV**)&GvFORM(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&GvFORM(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_CVGEN: /* 87 */
{
U32 arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_cvgen U32:0x%x\n", insn, arg));
GvCVGEN(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " GvCVGEN(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_LINE: /* 88 */
{
line_t arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_line line_t:0x%x\n", insn, arg));
GvLINE(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " GvLINE(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_GP_SHARE: /* 89 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) gp_share svindex:0x%x\n", insn, arg));
BSET_gp_share(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_gp_share(bstate->bs_sv, arg)\n"));
break;
}
case INSN_XGV_FLAGS: /* 90 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xgv_flags U8:0x%x\n", insn, arg));
GvFLAGS(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " GvFLAGS(bstate->bs_sv) = arg;\n"));
break;
}
case INSN_OP_NEXT: /* 91 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_next opindex:0x%x\n", insn, arg));
PL_op->op_next = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op->op_next = arg;\n"));
break;
}
case INSN_OP_SIBLING: /* 92 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_sibling opindex:0x%x\n", insn, arg));
PL_op->op_sibling = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op->op_sibling = arg;\n"));
break;
}
case INSN_OP_PPADDR: /* 93 */
{
strconst arg;
BGET_strconst(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_ppaddr strconst:0x%x\n", insn, arg));
BSET_op_ppaddr(PL_op->op_ppaddr, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_op_ppaddr(PL_op->op_ppaddr, arg)\n"));
break;
}
case INSN_OP_TARG: /* 94 */
{
PADOFFSET arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_targ PADOFFSET:0x%x\n", insn, arg));
PL_op->op_targ = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op->op_targ = arg;\n"));
break;
}
case INSN_OP_TYPE: /* 95 */
{
OPCODE arg;
BGET_U16(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_type OPCODE:0x%x\n", insn, arg));
BSET_op_type(PL_op, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_op_type(PL_op, arg)\n"));
break;
}
case INSN_OP_OPT: /* 96 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_opt U8:0x%x\n", insn, arg));
PL_op->op_opt = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op->op_opt = arg;\n"));
break;
}
case INSN_OP_LATEFREE: /* 97 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_latefree U8:0x%x\n", insn, arg));
PL_op->op_latefree = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op->op_latefree = arg;\n"));
break;
}
case INSN_OP_LATEFREED: /* 98 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_latefreed U8:0x%x\n", insn, arg));
PL_op->op_latefreed = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op->op_latefreed = arg;\n"));
break;
}
case INSN_OP_ATTACHED: /* 99 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_attached U8:0x%x\n", insn, arg));
PL_op->op_attached = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op->op_attached = arg;\n"));
break;
}
case INSN_OP_FLAGS: /* 100 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_flags U8:0x%x\n", insn, arg));
PL_op->op_flags = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op->op_flags = arg;\n"));
break;
}
case INSN_OP_PRIVATE: /* 101 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_private U8:0x%x\n", insn, arg));
PL_op->op_private = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_op->op_private = arg;\n"));
break;
}
case INSN_OP_FIRST: /* 102 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_first opindex:0x%x\n", insn, arg));
cUNOP->op_first = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cUNOP->op_first = arg;\n"));
break;
}
case INSN_OP_LAST: /* 103 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_last opindex:0x%x\n", insn, arg));
cBINOP->op_last = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cBINOP->op_last = arg;\n"));
break;
}
case INSN_OP_OTHER: /* 104 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_other opindex:0x%x\n", insn, arg));
cLOGOP->op_other = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cLOGOP->op_other = arg;\n"));
break;
}
case INSN_OP_PMREPLROOT: /* 105 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_pmreplroot opindex:0x%x\n", insn, arg));
(cPMOP->op_pmreplrootu).op_pmreplroot = arg;
+ DEBUG_v(Perl_deb(aTHX_ " (cPMOP->op_pmreplrootu).op_pmreplroot = arg;\n"));
break;
}
case INSN_OP_PMREPLSTART: /* 106 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_pmreplstart opindex:0x%x\n", insn, arg));
(cPMOP->op_pmstashstartu).op_pmreplstart = arg;
+ DEBUG_v(Perl_deb(aTHX_ " (cPMOP->op_pmstashstartu).op_pmreplstart = arg;\n"));
break;
}
#ifdef USE_ITHREADS
- case INSN_OP_PMSTASHPV: /* 107 */
- {
- pvindex arg;
- BGET_pvindex(arg);
- BSET_op_pmstashpv(cPMOP, arg);
- break;
- }
- case INSN_OP_PMREPLROOTPO: /* 108 */
+ case INSN_OP_PMREPLROOTPO: /* 107 */
{
PADOFFSET arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_pmreplrootpo PADOFFSET:0x%x\n", insn, arg));
(cPMOP->op_pmreplrootu).op_pmreplroot = (OP*)arg;
+ DEBUG_v(Perl_deb(aTHX_ " (cPMOP->op_pmreplrootu).op_pmreplroot = (OP*)arg;\n"));
break;
}
#else
+ case INSN_OP_PMSTASH: /* 108 */
+ {
+ svindex arg;
+ BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_pmstash svindex:0x%x\n", insn, arg));
+ *(SV**)&cPMOP->op_pmstash = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&cPMOP->op_pmstash = arg;\n"));
+ break;
+ }
case INSN_OP_PMREPLROOTGV: /* 109 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_pmreplrootgv svindex:0x%x\n", insn, arg));
*(SV**)&((cPMOP->op_pmreplrootu).op_pmreplroot) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&((cPMOP->op_pmreplrootu).op_pmreplroot) = arg;\n"));
break;
}
#endif
case INSN_PREGCOMP: /* 110 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) pregcomp svindex:0x%x\n", insn, arg));
BSET_pregcomp(PL_op, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_pregcomp(PL_op, arg)\n"));
break;
}
case INSN_OP_PMFLAGS: /* 111 */
{
U16 arg;
BGET_U16(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_pmflags U16:0x%x\n", insn, arg));
cPMOP->op_pmflags = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cPMOP->op_pmflags = arg;\n"));
break;
}
- case INSN_OP_SV: /* 112 */
+#if PERL_VERSION < 11
+ case INSN_OP_REFLAGS: /* 112 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_reflags U32:0x%x\n", insn, arg));
+ PM_GETRE(cPMOP)->extflags = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PM_GETRE(cPMOP)->extflags = arg;\n"));
+ break;
+ }
+#else
+ case INSN_OP_REFLAGS: /* 113 */
+ {
+ U32 arg;
+ BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_reflags U32:0x%x\n", insn, arg));
+ ((ORANGE*)SvANY(PM_GETRE(cPMOP)))->extflags = arg;
+ DEBUG_v(Perl_deb(aTHX_ " ((ORANGE*)SvANY(PM_GETRE(cPMOP)))->extflags = arg;\n"));
+ break;
+ }
+#endif
+ case INSN_OP_SV: /* 114 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_sv svindex:0x%x\n", insn, arg));
cSVOP->op_sv = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cSVOP->op_sv = arg;\n"));
break;
}
- case INSN_OP_PADIX: /* 113 */
+ case INSN_OP_PADIX: /* 115 */
{
PADOFFSET arg;
BGET_PADOFFSET(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_padix PADOFFSET:0x%x\n", insn, arg));
cPADOP->op_padix = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cPADOP->op_padix = arg;\n"));
break;
}
- case INSN_OP_PV: /* 114 */
+ case INSN_OP_PV: /* 116 */
{
pvcontents arg;
BGET_pvcontents(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_pv pvcontents:0x%x\n", insn, arg));
cPVOP->op_pv = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cPVOP->op_pv = arg;\n"));
break;
}
- case INSN_OP_PV_TR: /* 115 */
+ case INSN_OP_PV_TR: /* 117 */
{
op_tr_array arg;
BGET_op_tr_array(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_pv_tr op_tr_array:0x%x\n", insn, arg));
cPVOP->op_pv = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cPVOP->op_pv = arg;\n"));
break;
}
- case INSN_OP_REDOOP: /* 116 */
+ case INSN_OP_REDOOP: /* 118 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_redoop opindex:0x%x\n", insn, arg));
cLOOP->op_redoop = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cLOOP->op_redoop = arg;\n"));
break;
}
- case INSN_OP_NEXTOP: /* 117 */
+ case INSN_OP_NEXTOP: /* 119 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_nextop opindex:0x%x\n", insn, arg));
cLOOP->op_nextop = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cLOOP->op_nextop = arg;\n"));
break;
}
- case INSN_OP_LASTOP: /* 118 */
+ case INSN_OP_LASTOP: /* 120 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) op_lastop opindex:0x%x\n", insn, arg));
cLOOP->op_lastop = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cLOOP->op_lastop = arg;\n"));
break;
}
- case INSN_COP_LABEL: /* 119 */
+ case INSN_COP_LABEL: /* 121 */
{
pvindex arg;
BGET_pvindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) cop_label pvindex:0x%x\n", insn, arg));
cCOP->cop_label = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cCOP->cop_label = arg;\n"));
break;
}
- case INSN_COP_STASHPV: /* 120 */
+#ifndef USE_ITHREADS
+ case INSN_COP_STASH: /* 122 */
{
- pvindex arg;
- BGET_pvindex(arg);
- BSET_cop_stashpv(cCOP, arg);
+ svindex arg;
+ BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) cop_stash svindex:0x%x\n", insn, arg));
+ BSET_cop_stash(cCOP, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_cop_stash(cCOP, arg)\n"));
break;
}
- case INSN_COP_FILE: /* 121 */
+ case INSN_COP_FILEGV: /* 123 */
{
- pvindex arg;
- BGET_pvindex(arg);
- BSET_cop_file(cCOP, arg);
+ svindex arg;
+ BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) cop_filegv svindex:0x%x\n", insn, arg));
+ BSET_cop_filegv(cCOP, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_cop_filegv(cCOP, arg)\n"));
break;
}
- case INSN_COP_SEQ: /* 122 */
+#endif
+ case INSN_COP_SEQ: /* 124 */
{
U32 arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) cop_seq U32:0x%x\n", insn, arg));
cCOP->cop_seq = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cCOP->cop_seq = arg;\n"));
break;
}
- case INSN_COP_LINE: /* 123 */
+ case INSN_COP_LINE: /* 125 */
{
line_t arg;
BGET_U32(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) cop_line line_t:0x%x\n", insn, arg));
cCOP->cop_line = arg;
+ DEBUG_v(Perl_deb(aTHX_ " cCOP->cop_line = arg;\n"));
break;
}
- case INSN_COP_WARNINGS: /* 124 */
+ case INSN_COP_WARNINGS: /* 126 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) cop_warnings svindex:0x%x\n", insn, arg));
BSET_cop_warnings(cCOP, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_cop_warnings(cCOP, arg)\n"));
break;
}
- case INSN_MAIN_START: /* 125 */
+ case INSN_MAIN_START: /* 127 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) main_start opindex:0x%x\n", insn, arg));
PL_main_start = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_main_start = arg;\n"));
break;
}
- case INSN_MAIN_ROOT: /* 126 */
+ case INSN_MAIN_ROOT: /* 128 */
{
opindex arg;
BGET_opindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) main_root opindex:0x%x\n", insn, arg));
PL_main_root = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_main_root = arg;\n"));
break;
}
- case INSN_MAIN_CV: /* 127 */
+ case INSN_MAIN_CV: /* 129 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) main_cv svindex:0x%x\n", insn, arg));
*(SV**)&PL_main_cv = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&PL_main_cv = arg;\n"));
break;
}
- case INSN_CURPAD: /* 128 */
+ case INSN_CURPAD: /* 130 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) curpad svindex:0x%x\n", insn, arg));
BSET_curpad(PL_curpad, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_curpad(PL_curpad, arg)\n"));
break;
}
- case INSN_PUSH_BEGIN: /* 129 */
+ case INSN_PUSH_BEGIN: /* 131 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) push_begin svindex:0x%x\n", insn, arg));
BSET_push_begin(PL_beginav, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_push_begin(PL_beginav, arg)\n"));
break;
}
- case INSN_PUSH_INIT: /* 130 */
+ case INSN_PUSH_INIT: /* 132 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) push_init svindex:0x%x\n", insn, arg));
BSET_push_init(PL_initav, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_push_init(PL_initav, arg)\n"));
break;
}
- case INSN_PUSH_END: /* 131 */
+ case INSN_PUSH_END: /* 133 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) push_end svindex:0x%x\n", insn, arg));
BSET_push_end(PL_endav, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_push_end(PL_endav, arg)\n"));
break;
}
- case INSN_CURSTASH: /* 132 */
+ case INSN_CURSTASH: /* 134 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) curstash svindex:0x%x\n", insn, arg));
*(SV**)&PL_curstash = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&PL_curstash = arg;\n"));
break;
}
- case INSN_DEFSTASH: /* 133 */
+ case INSN_DEFSTASH: /* 135 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) defstash svindex:0x%x\n", insn, arg));
*(SV**)&PL_defstash = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&PL_defstash = arg;\n"));
break;
}
- case INSN_DATA: /* 134 */
+ case INSN_DATA: /* 136 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) data U8:0x%x\n", insn, arg));
BSET_data(none, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_data(none, arg)\n"));
break;
}
- case INSN_INCAV: /* 135 */
+ case INSN_INCAV: /* 137 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) incav svindex:0x%x\n", insn, arg));
*(SV**)&GvAV(PL_incgv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&GvAV(PL_incgv) = arg;\n"));
break;
}
- case INSN_LOAD_GLOB: /* 136 */
+ case INSN_LOAD_GLOB: /* 138 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) load_glob svindex:0x%x\n", insn, arg));
BSET_load_glob(none, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_load_glob(none, arg)\n"));
break;
}
#ifdef USE_ITHREADS
- case INSN_REGEX_PADAV: /* 137 */
- {
- svindex arg;
- BGET_svindex(arg);
- *(SV**)&PL_regex_padav = arg;
- break;
- }
#endif
- case INSN_DOWARN: /* 138 */
+ case INSN_DOWARN: /* 139 */
{
U8 arg;
BGET_U8(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) dowarn U8:0x%x\n", insn, arg));
PL_dowarn = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_dowarn = arg;\n"));
break;
}
- case INSN_COMPPAD_NAME: /* 139 */
+ case INSN_COMPPAD_NAME: /* 140 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) comppad_name svindex:0x%x\n", insn, arg));
*(SV**)&PL_comppad_name = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&PL_comppad_name = arg;\n"));
break;
}
- case INSN_XGV_STASH: /* 140 */
+ case INSN_XGV_STASH: /* 141 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) xgv_stash svindex:0x%x\n", insn, arg));
*(SV**)&GvSTASH(bstate->bs_sv) = arg;
+ DEBUG_v(Perl_deb(aTHX_ " *(SV**)&GvSTASH(bstate->bs_sv) = arg;\n"));
break;
}
- case INSN_SIGNAL: /* 141 */
+ case INSN_SIGNAL: /* 142 */
{
strconst arg;
BGET_strconst(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) signal strconst:0x%x\n", insn, arg));
BSET_signal(bstate->bs_sv, arg);
+ DEBUG_v(Perl_deb(aTHX_ " BSET_signal(bstate->bs_sv, arg)\n"));
break;
}
- case INSN_FORMFEED: /* 142 */
+ case INSN_FORMFEED: /* 143 */
{
svindex arg;
BGET_svindex(arg);
+ DEBUG_v(Perl_deb(aTHX_ "(insn %3d) formfeed svindex:0x%x\n", insn, arg));
PL_formfeed = arg;
+ DEBUG_v(Perl_deb(aTHX_ " PL_formfeed = arg;\n"));
break;
}
default:
View
85 ByteLoader/byterun.h
@@ -22,16 +22,26 @@ struct byteloader_fdata {
int idx;
};
+#if PERL_VERSION > 8
+
+struct byteloader_xpv {
+ char *xpv_pv;
+ int xpv_cur;
+ int xpv_len;
+};
+
+#endif
+
struct byteloader_state {
struct byteloader_fdata *bs_fdata;
SV *bs_sv;
void **bs_obj_list;
int bs_obj_list_fill;
int bs_ix;
-#if PERL_VERSION < 9
- XPV bs_pv;
+#if PERL_VERSION > 8
+ struct byteloader_xpv bs_pv;
#else
- XPVIV bs_pv;
+ XPV bs_pv;
#endif
int bs_iv_overflows;
};
@@ -149,43 +159,44 @@ enum {
INSN_OP_OTHER, /* 104 */
INSN_OP_PMREPLROOT, /* 105 */
INSN_OP_PMREPLSTART, /* 106 */
- INSN_OP_PMSTASHPV, /* 107 */
- INSN_OP_PMREPLROOTPO, /* 108 */
+ INSN_OP_PMREPLROOTPO, /* 107 */
+ INSN_OP_PMSTASH, /* 108 */
INSN_OP_PMREPLROOTGV, /* 109 */
INSN_PREGCOMP, /* 110 */
INSN_OP_PMFLAGS, /* 111 */
- INSN_OP_SV, /* 112 */
- INSN_OP_PADIX, /* 113 */
- INSN_OP_PV, /* 114 */
- INSN_OP_PV_TR, /* 115 */
- INSN_OP_REDOOP, /* 116 */
- INSN_OP_NEXTOP, /* 117 */
- INSN_OP_LASTOP, /* 118 */
- INSN_COP_LABEL, /* 119 */
- INSN_COP_STASHPV, /* 120 */
- INSN_COP_FILE, /* 121 */
- INSN_COP_SEQ, /* 122 */
- INSN_COP_LINE, /* 123 */
- INSN_COP_WARNINGS, /* 124 */
- INSN_MAIN_START, /* 125 */
- INSN_MAIN_ROOT, /* 126 */
- INSN_MAIN_CV, /* 127 */
- INSN_CURPAD, /* 128 */
- INSN_PUSH_BEGIN, /* 129 */
- INSN_PUSH_INIT, /* 130 */
- INSN_PUSH_END, /* 131 */
- INSN_CURSTASH, /* 132 */
- INSN_DEFSTASH, /* 133 */
- INSN_DATA, /* 134 */
- INSN_INCAV, /* 135 */
- INSN_LOAD_GLOB, /* 136 */
- INSN_REGEX_PADAV, /* 137 */
- INSN_DOWARN, /* 138 */
- INSN_COMPPAD_NAME, /* 139 */
- INSN_XGV_STASH, /* 140 */
- INSN_SIGNAL, /* 141 */
- INSN_FORMFEED, /* 142 */
- MAX_INSN = 142
+ INSN_OP_REFLAGS, /* 112 */
+ INSN_OP_REFLAGS, /* 113 */
+ INSN_OP_SV, /* 114 */
+ INSN_OP_PADIX, /* 115 */
+ INSN_OP_PV, /* 116 */
+ INSN_OP_PV_TR, /* 117 */
+ INSN_OP_REDOOP, /* 118 */
+ INSN_OP_NEXTOP, /* 119 */
+ INSN_OP_LASTOP, /* 120 */
+ INSN_COP_LABEL, /* 121 */
+ INSN_COP_STASH, /* 122 */
+ INSN_COP_FILEGV, /* 123 */
+ INSN_COP_SEQ, /* 124 */
+ INSN_COP_LINE, /* 125 */
+ INSN_COP_WARNINGS, /* 126 */
+ INSN_MAIN_START, /* 127 */
+ INSN_MAIN_ROOT, /* 128 */
+ INSN_MAIN_CV, /* 129 */
+ INSN_CURPAD, /* 130 */
+ INSN_PUSH_BEGIN, /* 131 */
+ INSN_PUSH_INIT, /* 132 */
+ INSN_PUSH_END, /* 133 */
+ INSN_CURSTASH, /* 134 */
+ INSN_DEFSTASH, /* 135 */
+ INSN_DATA, /* 136 */
+ INSN_INCAV, /* 137 */
+ INSN_LOAD_GLOB, /* 138 */
+ INSN_DOWARN, /* 139 */
+ INSN_COMPPAD_NAME, /* 140 */
+ INSN_XGV_STASH, /* 141 */
+ INSN_SIGNAL, /* 142 */
+ INSN_FORMFEED, /* 143 */
+ MAX_INSN = 143
};
enum {
View
16 ByteLoader/jitrun.c
@@ -62,6 +62,14 @@ jitrun(pTHX_ struct byteloader_state *bstate)
U32 ix;
SV *specialsv_list[6];
+ int byteptr_max = 1000; /* size of DATA */
+ /* codebuffer: contains the JITed code (Temp allocation scheme) */
+ jit_insn *codeBuffer;
+ /* bcIndex: Address of the beginning of each BC in codeBuffer */
+ /* Only needed by (JMPHASH) and the unwind protect BCs */
+ jit_insn **bcIndex;
+ jit_func bc_func;
+
BYTECODE_HEADER_CHECK; /* croak if incorrect platform, */
if (!isjit) { /* set isjit if PLJC magic header */
Perl_croak(aTHX_ "No perl jitcode header PLJC\n");
@@ -82,17 +90,15 @@ jitrun(pTHX_ struct byteloader_state *bstate)
specialsv_list[6] = (SV*)pWARN_STD;
#endif
- int byteptr_max = 1000; /* size of DATA */
-
/* codebuffer: contains the JITed code (Temp allocation scheme) */
- jit_insn *codeBuffer = malloc(sizeof(jit_insn)*byteptr_max*JIT_AVG_BCSIZE);
+ codeBuffer = (jit_insn *)malloc(sizeof(jit_insn)*byteptr_max*JIT_AVG_BCSIZE);
/* bcIndex: Address of the beginning of each BC in codeBuffer */
/* Only needed by (JMPHASH) and the unwind protect BCs */
- jit_insn **bcIndex = calloc(byteptr_max+1,sizeof(jit_insn*));
+ bcIndex = (jit_insn **)calloc(byteptr_max+1,sizeof(jit_insn*));
/* TODO: setup the bcIndex jumps and copy codeBuffer */
- jit_func bc_func = (jit_func) (jit_set_ip(codeBuffer).iptr); /* Function ptr */
+ bc_func = (jit_func) (jit_set_ip(codeBuffer).iptr); /* Function ptr */
#ifdef DEBUGGING
//disassemble(stderr, codeBuffer, jit_get_ip().ptr);
#endif
View
2 ByteLoader/jitrun.h
@@ -65,7 +65,7 @@
#include <lightning.h>
-int jitrun(pTHX_ register struct byteloader_state *);
+/* int jitrun(pTHX_ register struct byteloader_state *); */
/* Pointer to a JIT-Compiled function */
/* Takes the closure and the distance to the starting bytecode as arguments */
View
24 Changes
@@ -1,9 +1,31 @@
Started with B-C-1.04_01. The perl compiler was previously in CORE.
TODO: Try to get info about earlier versions.
-1.04_09 2008-02-23 rurban
+1.04_10 2008-02-26 rurban
+ * change bc pvx access
+ dummy struct bytestate_xpv, so pv has the same fields as with 5.8,
+ seperated from the sv. The sv is seperated from the pv.
+ TODO: different strategy for B::C, must link xpv to sv
+ * add and parse Assembler comments
+ * change op_reflags from U16 to U32
+ * guarantee ByteLoader backwards compatibility: Accept lower versions also.
+
+1.04_09 2008-02-25 rurban
+ * restored 5.8 backwards compatibility, mainly for test comparison.
+ CPAN installation will abort.
* make t/test*.sh PERL independent
* fixed B::C GV init crashes (SvPOK assertion)
+ * added B::C RE section
+ * fixed B::C xpvcv and xpvnv section
+ * comment Bytecode -S nice ops to re-assemble them without errors
+ * added new asm opcode op_reflags
+ * removed Bytecode cop_arybase for 5.10
+ * 5.8 compatibility: fixed bytecode.pl versioning, Asmdata creation
+ (exact same for 5.8.8), asmdata.t, b.t tests
+ * improved make clean
+ * add ByteLoader -Dt and -Dv debugging
+ * don't link against jit code against possible sideeffects
+ * fixed c.t and cc.t tests
1.04_08 2008-02-22 rurban
* fixed t/b.t tests for 5.11 (REGEXP, ref RV => IV)
View
2 META.yml
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: B-C
-version: 1.04_09
+version: 1.04_10
abstract: ~
license: ~
author: ~
View
14 Makefile.PL
@@ -14,6 +14,8 @@ WriteMakefile(
'B::Concise' => '0.74',
'B' => '1.17',
},
+ clean => { FILES => "bytecode[1-9]* ccode[1-9]* *.core *.stackdump ".
+ "a.out *.cee *.c *.asm *.dbg *.plc *.concise"},
# PMLIBDIRS => [ 'lib/B' ],
);
@@ -52,19 +54,21 @@ sub depend {
$perlcc_inst :: $perlcc_exp
\$(CP) $perlcc_exp $perlcc_inst
-$asmdata : bytecode.pl @headers
+C.c : C.xs Makefile
+
+$asmdata : bytecode.pl @headers Makefile
\$(PERL) bytecode.pl
-$byterun_c : bytecode.pl @headers
+$byterun_c : bytecode.pl @headers Makefile
\$(PERL) bytecode.pl
-$byterun_h : bytecode.pl @headers
+$byterun_h : bytecode.pl @headers Makefile
\$(PERL) bytecode.pl
-$jitrun_h : jitcompiler.pl @headers
+$jitrun_h : jitcompiler.pl @headers Makefile
\$(PERL) jitcompiler.pl
-$jitrun_c : jitcompiler.pl @headers
+$jitrun_c : jitcompiler.pl @headers Makefile
\$(PERL) jitcompiler.pl
"
}
View
149 bytecode.pl
@@ -1,5 +1,5 @@
BEGIN {
- push @INC, '.';
+ push @INC, '.', 'lib';
require 'regen_lib.pl';
}
use strict;
@@ -15,8 +15,18 @@ BEGIN
while (($from, $tos) = each %alias_to) {
map { $alias_from{$_} = $from } @$tos;
}
-
-use B qw(@optype @specialsv_name);
+my (@optype, @specialsv_name);
+require B;
+if ($] < 5.009) {
+ require B::Asmdata;
+ @optype = @{*B::Asmdata::optype{ARRAY}};
+ @specialsv_name = @{*B::Asmdata::specialsv_name{ARRAY}};
+ # import B::Asmdata qw(@optype @specialsv_name);
+} else {
+ @optype = @{*B::optype{ARRAY}};
+ @specialsv_name = @{*B::specialsv_name{ARRAY}};
+ # import B qw(@optype @specialsv_name);
+}
my $c_header = <<'EOT';
/* -*- buffer-read-only: t -*-
@@ -35,13 +45,14 @@ BEGIN
my $perl_header;
($perl_header = $c_header) =~ s{[/ ]?\*/?}{#}g;
+my @targets = ("lib/B/Asmdata.pm", "ByteLoader/byterun.c", "ByteLoader/byterun.h");
-safer_unlink "ByteLoader/byterun.c", "ByteLoader/byterun.h", "lib/B/Asmdata.pm";
+safer_unlink @targets;
#
# Start with boilerplate for Asmdata.pm
#
-open(ASMDATA_PM, ">lib/B/Asmdata.pm") or die "lib/B/Asmdata.pm: $!";
+open(ASMDATA_PM, "> $targets[0]") or die "$targets[0]: $!";
binmode ASMDATA_PM;
print ASMDATA_PM $perl_header, <<'EOT';
package B::Asmdata;
@@ -51,11 +62,21 @@ package B::Asmdata;
use Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(%insn_data @insn_name @optype @specialsv_name);
-our(%insn_data, @insn_name);
+EOT
+
+if ($] > 5.009) {
+ print ASMDATA_PM 'our(%insn_data, @insn_name);
use B qw(@optype @specialsv_name);
+';
+} else {
+ print ASMDATA_PM 'our(%insn_data, @insn_name, @optype, @specialsv_name);
+
+@optype = qw(OP UNOP BINOP LOGOP LISTOP PMOP SVOP PADOP PVOP LOOP COP);
+@specialsv_name = qw(Nullsv &PL_sv_undef &PL_sv_yes &PL_sv_no pWARN_ALL pWARN_NONE);
+';
+}
-EOT
print ASMDATA_PM <<"EOT";
# XXX insn_data is initialised this way because with a large
@@ -66,7 +87,7 @@ package B::Asmdata;
#
# Boilerplate for byterun.c
#
-open(BYTERUN_C, ">ByteLoader/byterun.c") or die "ByteLoader/byterun.c: $!";
+open(BYTERUN_C, "> $targets[1]") or die "$targets[1]: $!";
binmode BYTERUN_C;
print BYTERUN_C $c_header, <<'EOT';
@@ -114,14 +135,19 @@ package B::Asmdata;
printf BYTERUN_C " SV *specialsv_list[%d];\n", scalar @specialsv_name;
print BYTERUN_C <<'EOT';
- BYTECODE_HEADER_CHECK; /* croak if incorrect platform, set isjit if PLJC magic header */
+ BYTECODE_HEADER_CHECK; /* croak if incorrect platform, set isjit on PLJC magic header */
if (isjit) {
- return jitrun(aTHX_ &bstate);
+ return 0; /*jitrun(aTHX_ &bstate);*/
} else {
Newx(bstate->bs_obj_list, 32, void*); /* set op objlist */
bstate->bs_obj_list_fill = 31;
bstate->bs_obj_list[0] = NULL; /* first is always Null */
bstate->bs_ix = 1;
+#if 0 && (PERL_VERSION > 8)
+ Newx(bstate->bs_sv, sizeof(SV), SV*); /* set sv */
+ bstate->bs_sv->sv_any = &(bstate->bs_pv);
+#endif
+ CopLINE(PL_curcop) = bstate->bs_fdata->next_out;
DEBUG_l( Perl_deb(aTHX_ "(bstate.bs_fdata.idx %d)\n", bstate->bs_fdata->idx));
DEBUG_l( Perl_deb(aTHX_ "(bstate.bs_fdata.next_out %d)\n", bstate->bs_fdata->next_out));
DEBUG_l( Perl_deb(aTHX_ "(bstate.bs_fdata.datasv %p:\"%s\")\n", bstate->bs_fdata->datasv,
@@ -136,7 +162,8 @@ package B::Asmdata;
print BYTERUN_C <<'EOT';
while ((insn = BGET_FGETC()) != EOF) {
- DEBUG_l( Perl_deb(aTHX_ "(insn %d)\n", insn));
+ CopLINE(PL_curcop) = bstate->bs_fdata->next_out;
+ if (PL_op && DEBUG_t_TEST_) debop(PL_op);
switch (insn) {
EOT
@@ -162,16 +189,19 @@ package B::Asmdata;
if ($argtype =~ m:(.+)/(.+):) {
($rvalcast, $argtype) = ("($1)", $2);
}
- if ($ver) {
+ if ($ver) {
if ($ver =~ /^\!?i$/) {
my $thisthreads = $Config{useithreads} eq 'define';
next if ($ver eq 'i' and !$thisthreads) or ($ver eq '!i' and $thisthreads);
- } else { # 5.010
- my $thisver = sprintf("%d", ($[ - 5) * 1000);
- if ($ver =~ /^\>?\d*$/) {
- next if $ver < $thisver; # 10: skip if lower than 10
+ } else { # perl version 5.010 >= 10, 5.009 > 9
+ # Have to round the float: 5.010 - 5 = 0.00999999999999979
+ my $pver = sprintf("%d", (sprintf("%f",$] - 5) * 1000));
+ if ($ver =~ /^\>\d+$/) {
+ next if $pver < substr($ver,1); # ver >10: skip if pvar lowereq 10
} elsif ($ver =~ /^\<\d*$/) {
- next if $ver > $thisver; # <10: skip if higher than 10;
+ next if $pver >= substr($ver,1); # ver <10: skip if pvar higher than 10;
+ } elsif ($ver =~ /^\d*$/) {
+ next if $pver < $ver; # ver 10: skip if pvar lower than 10;
}
}
}
@@ -186,15 +216,21 @@ package B::Asmdata;
my $optarg = $argtype eq "none" ? "" : ", arg";
if ($optarg) {
printf BYTERUN_C "\t\t$argtype arg;\n\t\tBGET_%s(arg);\n", $fundtype;
+ print BYTERUN_C "\t\tDEBUG_v(Perl_deb(aTHX_ \"(insn %3d) $insn $argtype:0x%x\\n\", insn, arg));\n";
+ } else {
+ print BYTERUN_C "\t\tDEBUG_v(Perl_deb(aTHX_ \"(insn %3d) $insn\\n\", insn));\n";
}
if ($flags =~ /x/) {
print BYTERUN_C "\t\tBSET_$insn($lvalue$optarg);\n";
+ print BYTERUN_C "\t\tDEBUG_v(Perl_deb(aTHX_ \"\t BSET_$insn($lvalue$optarg)\\n\"));\n";
} elsif ($flags =~ /s/) {
# Store instructions store to bytecode_obj_list[arg]. "lvalue" field is rvalue.
print BYTERUN_C "\t\tBSET_OBJ_STORE($lvalue$optarg);\n";
+ print BYTERUN_C "\t\tDEBUG_v(Perl_deb(aTHX_ \"\t BSET_OBJ_STORE($lvalue$optarg)\\n\"));\n";
}
elsif ($optarg && $lvalue ne "none") {
print BYTERUN_C "\t\t$lvalue = ${rvalcast}arg;\n";
+ print BYTERUN_C "\t\tDEBUG_v(Perl_deb(aTHX_ \"\t $lvalue = ${rvalcast}arg;\\n\"));\n";
}
print BYTERUN_C "\t\tbreak;\n\t }\n";
@@ -228,7 +264,7 @@ package B::Asmdata;
#
# Write the instruction and optype enum constants into byterun.h
#
-open(BYTERUN_H, ">ByteLoader/byterun.h") or die "ByteLoader/byterun.h: $!";
+open(BYTERUN_H, "> $targets[2]") or die "$targets[2]: $!";
binmode BYTERUN_H;
print BYTERUN_H $c_header, <<'EOT';
#if PERL_VERSION < 10
@@ -243,16 +279,26 @@ package B::Asmdata;
int idx;
};
+#if PERL_VERSION > 8
+
+struct byteloader_xpv {
+ char *xpv_pv;
+ int xpv_cur;
+ int xpv_len;
+};
+
+#endif
+