This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec(): skip second intuit() call
authorDavid Mitchell <davem@iabyn.com>
Sat, 13 Jul 2013 19:16:19 +0000 (20:16 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sun, 28 Jul 2013 09:33:37 +0000 (10:33 +0100)
commitdfa77d06f76732ca30c8606edc55c6fc01c9dbc7
treef18a7bf7db73b2dbb69005d9366d7d6eef771bfd
parentcf44e600505da0c8da2d64849647ce2d39c46808
regexec(): skip second intuit() call

A few commits ago, the call to intuit() done by the *callers* of
regexec() was moved into regexec() itself. Since regexec() could also call
intuit(), this temporarily led to the situation where intuit() was
harmlessly but inefficiently called twice. The last few commits have
removed the subtle differences between the conditions for each of the two
call points, so the second call to intuit() can now be removed.

A consequence of this is that we have to adjust the usage of the
'startpos' verses 's' variables; the original intent was that
startpos was constant, while s moved forward in the string after intuit
etc. This got a bit lost during the recent reorganisation, but is now
re-established. (startpos isn't quite constant: it will contain any
initial adjustment for \G.)
regexec.c