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
$insn_data{xcv_depth} = [49, \&PUT_I32, "GET_I32"];
$insn_data{xcv_padlist} = [50, \&PUT_svindex, "GET_svindex"];
$insn_data{xcv_outside} = [51, \&PUT_svindex, "GET_svindex"];
-$insn_data{xcv_flags} = [52, \&PUT_U8, "GET_U8"];
+$insn_data{xcv_flags} = [52, \&PUT_U16, "GET_U16"];
$insn_data{av_extend} = [53, \&PUT_I32, "GET_I32"];
$insn_data{av_push} = [54, \&PUT_svindex, "GET_svindex"];
$insn_data{xav_fill} = [55, \&PUT_I32, "GET_I32"];
return if saved($gv);
my $ix = $gv->objix;
mark_saved($gv);
- my $gvname = $gv->NAME;
- my $name = cstring($gv->STASH->NAME . "::" . $gvname);
- my $egv = $gv->EGV;
- my $egvix = $egv->objix;
ldsv($ix);
- printf <<"EOT", $gv->FLAGS, $gv->GvFLAGS, $gv->LINE, pvstring($gv->FILE);
+ printf <<"EOT", $gv->FLAGS, $gv->GvFLAGS;
sv_flags 0x%x
xgv_flags 0x%x
+EOT
+ my $refcnt = $gv->REFCNT;
+ printf("sv_refcnt_add %d\n", $refcnt - 1) if $refcnt > 1;
+ return if $gv->is_empty;
+ printf <<"EOT", $gv->LINE, pvstring($gv->FILE);
gp_line %d
newpv %s
gp_file
EOT
- my $refcnt = $gv->REFCNT;
- printf("sv_refcnt_add %d\n", $refcnt - 1) if $refcnt > 1;
+ my $gvname = $gv->NAME;
+ my $name = cstring($gv->STASH->NAME . "::" . $gvname);
+ my $egv = $gv->EGV;
+ my $egvix = $egv->objix;
my $gvrefcnt = $gv->GvREFCNT;
printf("gp_refcnt_add %d\n", $gvrefcnt - 1) if $gvrefcnt > 1;
if ($gvrefcnt > 1 && $ix != $egvix) {
for ($i = 0; $i < @ixes; $i++) {
printf "xcv_%s %d\n", lc($subfield_names[$i]), $ixes[$i];
}
- printf "xcv_depth %d\nxcv_flags 0x%x\n", $cv->DEPTH, $cv->FLAGS;
+ printf "xcv_depth %d\nxcv_flags 0x%x\n", $cv->DEPTH, $cv->CvFLAGS;
printf "newpv %s\nxcv_file\n", pvstring($cv->FILE);
# Now save all the subfields (except for CvROOT which was handled
# above) and CvSTART (now the initial element of @subfields).
perl_mutex *xcv_mutexp;
struct perl_thread *xcv_owner; /* current owner thread */
#endif /* USE_THREADS */
- U8 xcv_flags;
+ cv_flags_t xcv_flags;
} XPVCV_or_similar;
#define ANYINIT(i) i
#else
} \
} STMT_END
-#define BGET_comment_t(arg) \
+#ifdef BYTELOADER_LOG_COMMENTS
+# define BGET_comment_t(arg) \
+ STMT_START { \
+ char buf[1024]; \
+ int i = 0; \
+ do { \
+ arg = BGET_FGETC(); \
+ buf[i++] = (char)arg; \
+ } while (arg != '\n' && arg != EOF); \
+ buf[i] = '\0'; \
+ PerlIO_printf(PerlIO_stderr(), "%s", buf); \
+ } STMT_END
+#else
+# define BGET_comment_t(arg) \
do { arg = BGET_FGETC(); } while (arg != '\n' && arg != EOF)
+#endif
/*
* In the following, sizeof(IV)*4 is just a way of encoding 32 on 64-bit-IV
((PMOP*)o)->op_pmregexp = arg ? \
CALLREGCOMP(aTHX_ arg, arg + 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_newop(o, arg) ((o = (OP*)safemalloc(optype_size[arg])), \
+ memzero((char*)o,optype_size[arg]))
#define BSET_newopn(o, arg) STMT_START { \
OP *oldop = o; \
BSET_newop(o, arg); \
}
case INSN_XCV_FLAGS: /* 52 */
{
- U8 arg;
- BGET_U8(arg);
+ U16 arg;
+ BGET_U16(arg);
CvFLAGS(bytecode_sv) = arg;
break;
}