printf "\top_last\t\t0x%x\n", ${$op->last};
}
+sub B::LOOP::debug {
+ my ($op) = @_;
+ $op->B::BINOP::debug();
+ printf <<'EOT', ${$op->redoop}, ${$op->nextop}, ${$op->lastop};
+ op_redoop 0x%x
+ op_nextop 0x%x
+ op_lastop 0x%x
+EOT
+}
+
sub B::LOGOP::debug {
my ($op) = @_;
$op->B::UNOP::debug();
printf "\top_pmnext\t0x%x\n", ${$op->pmnext};
printf "\top_pmregexp->precomp\t%s\n", cstring($op->precomp);
printf "\top_pmflags\t0x%x\n", $op->pmflags;
- $op->pmshort->debug;
$op->pmreplroot->debug;
}
sub B::COP::debug {
my ($op) = @_;
$op->B::OP::debug();
- my ($filegv) = $op->filegv;
- printf <<'EOT', $op->label, ${$op->stash}, $$filegv, $op->seq, $op->arybase, $op->line, ${$op->warnings};
+ printf <<'EOT', $op->label, $op->stashpv, $op->file, $op->seq, $op->arybase, $op->line, ${$op->warnings};
cop_label %s
- cop_stash 0x%x
- cop_filegv 0x%x
+ cop_stashpv %s
+ cop_file %s
cop_seq %d
cop_arybase %d
cop_line %d
cop_warnings 0x%x
EOT
- $filegv->debug;
}
sub B::SVOP::debug {
my ($start) = $sv->START;
my ($root) = $sv->ROOT;
my ($padlist) = $sv->PADLIST;
+ my ($file) = $sv->FILE;
my ($gv) = $sv->GV;
- my ($filegv) = $sv->FILEGV;
- printf <<'EOT', $$stash, $$start, $$root, $$gv, $$filegv, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
+ printf <<'EOT', $$stash, $$start, $$root, $$gv, $file, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
STASH 0x%x
START 0x%x
ROOT 0x%x
GV 0x%x
- FILEGV 0x%x
+ FILE %s
DEPTH %d
PADLIST 0x%x
OUTSIDE 0x%x
$start->debug if $start;
$root->debug if $root;
$gv->debug if $gv;
- $filegv->debug if $filegv;
$padlist->debug if $padlist;
}
sub B::GV::debug {
my ($gv) = @_;
if ($done_gv{$$gv}++) {
- printf "GV %s::%s\n", $gv->STASH->NAME, $gv->NAME;
+ printf "GV %s::%s\n", $gv->STASH->NAME, $gv->SAFENAME;
return;
}
my ($sv) = $gv->SV;
my ($av) = $gv->AV;
my ($cv) = $gv->CV;
$gv->B::SV::debug;
- printf <<'EOT', $gv->NAME, $gv->STASH->NAME, $gv->STASH, $$sv, $gv->GvREFCNT, $gv->FORM, $$av, ${$gv->HV}, ${$gv->EGV}, $$cv, $gv->CVGEN, $gv->LINE, $gv->FILEGV, $gv->GvFLAGS;
+ printf <<'EOT', $gv->SAFENAME, $gv->STASH->NAME, $gv->STASH, $$sv, $gv->GvREFCNT, $gv->FORM, $$av, ${$gv->HV}, ${$gv->EGV}, $$cv, $gv->CVGEN, $gv->LINE, $gv->FILE, $gv->GvFLAGS;
NAME %s
STASH %s (0x%x)
SV 0x%x
CV 0x%x
CVGEN %d
LINE %d
- FILEGV 0x%x
+ FILE %s
GvFLAGS 0x%x
EOT
$sv->debug if $sv;
sub compile {
my $order = shift;
B::clearsym();
- if ($order eq "exec") {
+ if ($order && $order eq "exec") {
return sub { walkoptree_exec(main_start, "debug") }
} else {
return sub { walkoptree(main_root, "debug") }