This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deparse: handle OP_PADRANGE in regex code blocks
authorDavid Mitchell <davem@iabyn.com>
Wed, 22 Feb 2017 16:54:51 +0000 (16:54 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 5 Jun 2017 11:52:17 +0000 (12:52 +0100)
Deparse handles the OP_PADRANGE op by overlaying the view of the optree
with the original pad ops (as if they had never been optimised into a
single OP_PADRANGE op).

However, the op treewalk to pessimise such ops wasn't walking into
the op subtrees of code blocks in patterns. So for example

    /(?{ my ($x, $y) = @a; })/

was being deparsed (with a warning) as

    /(?{ (XXX) = @a; })/

With this commit, this passes again:

 ./TEST -deparse re/pat_re_eval.t


No differences found