Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 9e3643e55115615410f8ceb3a141a92270ccb7c2
      
https://github.com/Perl/perl5/commit/9e3643e55115615410f8ceb3a141a92270ccb7c2
  Author: David Mitchell <[email protected]>
  Date:   2025-11-13 (Thu, 13 Nov 2025)

  Changed paths:
    M dump.c

  Log Message:
  -----------
  dump.c: add S_deb_padvar_cv() function

Make S_deb_padvar() a thin wrapper over a new S_deb_padvar_cv() function,
which does the same thing (display a pad variable name), but does it for
a specified CV rather than only for the currently executing CV. This
function will be used shorty.


  Commit: a95603a2975300582c3f24420dbb67416624cce3
      
https://github.com/Perl/perl5/commit/a95603a2975300582c3f24420dbb67416624cce3
  Author: David Mitchell <[email protected]>
  Date:   2025-11-13 (Thu, 13 Nov 2025)

  Changed paths:
    M dump.c

  Log Message:
  -----------
  dump.c: add S_get_cv_from_op() function

The existing S_get_sv_from_pad() function does two things: it finds the
CV associated with the specified op, and then extracts something from
that CV's pad.

This commit splits the 'find the associated CV' part of the code out
into a separate function, which will be used elsewhere shortly.


  Commit: 067d8a664e65d7a42102c3984c8e155224555150
      
https://github.com/Perl/perl5/commit/067d8a664e65d7a42102c3984c8e155224555150
  Author: David Mitchell <[email protected]>
  Date:   2025-11-13 (Thu, 13 Nov 2025)

  Changed paths:
    M dump.c

  Log Message:
  -----------
  op_dump(): display names of variables for pad ops.

Make op_dump(), as used by 'perl -Dx', display the names of pad
variables when dumping pad ops.

The runtime perl -Dt already does this (note the $x, $y etc appearing in
the op name displays):

    $ perl -Dt -e'my ($x, $y); $y = 1+$x'

    (-e:0)      enter
    (-e:0)      nextstate
    (-e:1)      padrange($x,$y)
    (-e:1)      nextstate
    (-e:1)      const(IV(1))
    (-e:1)      padsv($x)
    (-e:1)      add($y)
    (-e:1)      leave

While the (typically compile-time) -Dx detailed optree dumping didn't.
Here are some 'before this commit' and 'after' examples of how some of
those ops were/are now displayed. Note the changes in the 'TARG = N'
lines for the following code:

    $  perl -Dx -e'my ($x, $y); $y = 1+$x'

Before:

    4    |   +--padrange OP(0x31b08960) ===> 6 [nextstate 0x31b09fc0]
         |   |   TARG = 1
         |   |   FLAGS = (VOID,MOD,SLABBED,MORESIB)
         |   |   PRIVATE = (LVINTRO,range=0x2)

    10   +--add BINOP(0x31b0a060) ===> 1 [leave 0x31b08880]
             TARG = 2
             FLAGS = (VOID,KIDS,SLABBED)
             PRIVATE = (TARGMY,0x2)

    11       +--padsv OP(0x31b0a0a0) ===> 10 [add 0x31b0a060]
                 TARG = 1
                 FLAGS = (SCALAR,SLABBED)

After:

    4    |   +--padrange OP(0x18ffe920) ===> 6 [nextstate 0x18ffff80]
         |   |   TARG = 1 ($x,$y)
         |   |   FLAGS = (VOID,MOD,SLABBED,MORESIB)
         |   |   PRIVATE = (LVINTRO,range=0x2)

    10   +--add BINOP(0x19000020) ===> 1 [leave 0x18ffe840]
             TARG = 2 ($y)
             FLAGS = (VOID,KIDS,SLABBED)
             PRIVATE = (TARGMY,0x2)

    11       +--padsv OP(0x19000060) ===> 10 [add 0x19000020]
                 TARG = 1 ($x)
                 FLAGS = (SCALAR,SLABBED)


Compare: https://github.com/Perl/perl5/compare/60582f118553...067d8a664e65

To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to