This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "regcomp.c: Add shortcuts to some inversion list ops"
authorKarl Williamson <khw@cpan.org>
Fri, 17 Jun 2016 21:17:43 +0000 (15:17 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 17 Jun 2016 21:34:28 +0000 (15:34 -0600)
commit51e3e8c825a18bc0e09c2ae137d09f4a9c5bec08
tree9d663fb8a865c7b70e0d2b30535f272caa26e019
parente1711683d9d75ff4314d29ad0ca2e4268edcbaca
Revert "regcomp.c: Add shortcuts to some inversion list ops"

This reverts commit c29dfc6a6c45f86648c51f961304254cc3c449b9.

But it also removes the XXX suggesting that the things that commit did
should be  done.  It turns out that I didn't fully understand this, that
the shortcuts weren't found as frequently as I expected, and in fact
happened when they shouldn't have, creating bugs.  The only bugs I found
had to do with displaying what the regex compiled into under -Dr, but I
imagine there are others out there.  I did try to create some test cases
that showed the bugs, based on understanding how the code works, but
various things prevented them from actually being bugs.

To correctly decide to take the shortcut requires adding tests inside a
loop, and the shortcut is just to possibly save some work after the
loop.  That isn't a good tradeoff.
regcomp.c