Commit f2c853f
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 35846b2 commit f2c853f
1 file changed
+29
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3519 | 3519 | | |
3520 | 3520 | | |
3521 | 3521 | | |
| 3522 | + | |
| 3523 | + | |
3522 | 3524 | | |
3523 | 3525 | | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
3524 | 3544 | | |
3525 | 3545 | | |
3526 | 3546 | | |
3527 | 3547 | | |
3528 | 3548 | | |
3529 | 3549 | | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
3530 | 3553 | | |
| 3554 | + | |
| 3555 | + | |
3531 | 3556 | | |
3532 | 3557 | | |
3533 | 3558 | | |
| |||
3546 | 3571 | | |
3547 | 3572 | | |
3548 | 3573 | | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
3549 | 3578 | | |
3550 | 3579 | | |
3551 | 3580 | | |
| |||
0 commit comments