perl
view release on metacpan or search on metacpan
}
if (tmpsv && SvCUR(tmpsv)) {
S_opdump_indent(aTHX_ o, level, bar, file, "PRIVATE = (%s)\n",
SvPVX_const(tmpsv) + 1);
} else
S_opdump_indent(aTHX_ o, level, bar, file,
"PRIVATE = (0x%" UVxf ")\n", (UV)oppriv);
}
switch (optype) {
case OP_AELEMFAST:
case OP_GVSV:
case OP_GV:
case OP_RCATLINE:
{
GV *gv;
#ifdef USE_ITHREADS
S_opdump_indent(aTHX_ o, level, bar, file,
"PADIX = %" IVdf "\n", (IV)cPADOPo->op_padix);
gv = (GV*)S_get_sv_from_pad(aTHX_ o, cPADOPx(o)->op_padix, rootcv);
#else
gv = (GV*)cSVOPx(o)->op_sv;
#endif
if (gv)
S_opdump_indent(aTHX_ o, level, bar, file,
"GV = %" SVf " (0x%" UVxf ")\n",
SVfARG(S_gv_display(aTHX_ gv)), PTR2UV(gv));
break;
}
case OP_MULTIDEREF:
{
UNOP_AUX_item *items = cUNOP_AUXo->op_aux;
UV i, count = items[-1].uv;
S_opdump_indent(aTHX_ o, level, bar, file, "ARGS = \n");
for (i=0; i < count; i++)
S_opdump_indent(aTHX_ o, level+1, (bar << 1), file,
"%" UVuf " => 0x%" UVxf "\n",
i, items[i].uv);
break;
}
case OP_MULTICONCAT:
S_opdump_indent(aTHX_ o, level, bar, file, "NARGS = %" IVdf "\n",
(IV)cUNOP_AUXo->op_aux[PERL_MULTICONCAT_IX_NARGS].ssize);
/* XXX really ought to dump each field individually,
* but that's too much like hard work */
S_opdump_indent(aTHX_ o, level, bar, file, "CONSTS = (%" SVf ")\n",
SVfARG(multiconcat_stringify(o)));
break;
case OP_CONST:
case OP_HINTSEVAL:
case OP_COREARGS:
case OP_ANONCODE:
/* an SVOP. On non-threaded builds, these OPs use op_sv to hold
* the SV associated with the const / hints hash / op num.
* On threaded builds, op_sv initially holds the SV, then at the
* end of compiling the sub, the SV is moved into the pad by
* op_relocate_sv() and indexed by op_targ.
* XXX Currently the SV isn't relocated for OP_COREARGS.
*/
{
SV *sv = cSVOPo->op_sv;
if (!sv) {
S_opdump_indent(aTHX_ o, level, bar, file,
"OP_SV = 0x0\n");
#ifdef USE_ITHREADS
sv = S_get_sv_from_pad(aTHX_ o, o->op_targ, rootcv);
#endif
}
if (sv)
S_opdump_indent(aTHX_ o, level, bar, file,
"%s = %s (0x%" UVxf ")\n",
cSVOPo->op_sv ? "OP_SV" : "SV",
SvPEEK(sv),
PTR2UV(sv));
}
break;
case OP_METHOD: /* $obj->$foo */
break;
case OP_METHOD_NAMED: /* $obj->foo */
case OP_METHOD_SUPER: /* $obj->SUPER::foo */
case OP_METHOD_REDIR: /* $obj->BAR::foo */
case OP_METHOD_REDIR_SUPER: /* $obj->BAR::SUPER::foo */
{
/* display method name (e.g. 'foo') */
SV *sv = cMETHOPo->op_u.op_meth_sv;
if (!sv) {
S_opdump_indent(aTHX_ o, level, bar, file,
"OP_METH_SV = 0x0\n");
#ifdef USE_ITHREADS
sv = S_get_sv_from_pad(aTHX_ o, o->op_targ, rootcv);
#endif
}
if (sv)
S_opdump_indent(aTHX_ o, level, bar, file,
"%s = %s (0x%" UVxf ")\n",
cMETHOPo->op_u.op_meth_sv ? "OP_METH_SV" : "METH",
SvPEEK(sv),
PTR2UV(sv));
if (optype == OP_METHOD_REDIR || optype == OP_METHOD_REDIR_SUPER) {
/* display redirect class (e.g. 'BAR') */
#ifdef USE_ITHREADS
S_opdump_indent(aTHX_ o, level, bar, file,
"RCLASS_TARG = %" IVdf "\n", (IV)cMETHOPo->op_rclass_targ);
sv = S_get_sv_from_pad(aTHX_ o, cMETHOPo->op_rclass_targ,
rootcv);
#else
sv = cMETHOPo->op_rclass_sv;
#endif
if (sv)
S_opdump_indent(aTHX_ o, level, bar, file,
"RCLASS = %s (0x%" UVxf ")\n",
SvPEEK(sv),
PTR2UV(sv));
( run in 1.483 second using v1.01-cache-2.11-cpan-84de2e75c66 )