This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
remove some redundant code from CURLY rex ops
authorDavid Mitchell <davem@iabyn.com>
Sat, 26 May 2012 15:25:05 +0000 (16:25 +0100)
committerDavid Mitchell <davem@iabyn.com>
Wed, 13 Jun 2012 12:32:54 +0000 (13:32 +0100)
commit804888bc14896c15c367c0185acbf1960a53d09b
tree681a88cd35142a1c4d166b7a01bcb5e968df5b61
parentf6033a9d6c91e0c29d5aa5049361a529b5d7cdc4
remove some redundant code from CURLY rex ops

CURLY_B_*_fail all currently do:

    if (ST.paren && ST.count)
        rex->offs[ST.paren].end = -1;

but this is unnecessary. If B has just failed in the pattern /...(A)*B/,
then we will either adjust the amount of matched A, update rex->offs
(overwriting that -1) then call B again; or fail completely, do sayNO, and
backtrack to an op somewhere in the '...' before A. In this latter case,
the "somewhere else" op is the one responsible for unwinding the matched
parentheses, not us.
regexec.c