Commit d842683
committed
Perl_debop() / -Dt: display some OP args better
Perl_debop() displays an op in a compact one-line form, typically used
by 'perl -Dt' to show the next op to be executed.
This commit improves the display of some ops slightly: in particular,
where the name of a GV argument to the op, or the name of the associated
lexical var is displayed, sometimes this wasn't being done, for example
for the new op OP_PADSV_STORE, which probably just got missed when being
added.
It also now displays:
* the name of the lexical var for ops which have the OPpTARGET_MY
optimisation;
* the name of the method and redirect class for method ops;
* the index of the aelemfast and aelemfast_lex op
For example, with the following code:
my ($sum);
sub Bar::foo {}
my $obj = bless {}, 'Foo';
my @lexary;
$^D='t';
$sum = 1;
$sum = $ary[-2] + $lexary[3];
$obj->Bar::foo();
$x .= <>;
then before, the -Dt output for certain lines was:
padsv_store
aelemfast
aelemfast_lex
add
method_redir
rcatline
and is now:
padsv_store($sum)
aelemfast(main::ary)[-2]
aelemfast_lex(@lexary)[3]
add($sum)
method_redir(PV("foo"))(PV("Bar"))
rcatline(main::ARGV)1 parent 7738c44 commit d842683
1 file changed
+29
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3517 | 3517 | | |
3518 | 3518 | | |
3519 | 3519 | | |
| 3520 | + | |
| 3521 | + | |
3520 | 3522 | | |
3521 | 3523 | | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
3522 | 3542 | | |
3523 | 3543 | | |
3524 | 3544 | | |
3525 | 3545 | | |
3526 | 3546 | | |
3527 | 3547 | | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
3528 | 3551 | | |
| 3552 | + | |
| 3553 | + | |
3529 | 3554 | | |
3530 | 3555 | | |
3531 | 3556 | | |
| |||
3544 | 3569 | | |
3545 | 3570 | | |
3546 | 3571 | | |
| 3572 | + | |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
3547 | 3576 | | |
3548 | 3577 | | |
3549 | 3578 | | |
| |||
0 commit comments