This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Free up bit for regex ANYOF nodes
authorKarl Williamson <public@khwilliamson.com>
Thu, 30 Jan 2014 03:42:33 +0000 (20:42 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sun, 16 Feb 2014 04:55:32 +0000 (21:55 -0700)
commit34fdef848b1687b91892ba55e9e0c3430e0770f6
tree0c42f2e84076a6040b8b29fe47ad88c92228640b
parent56feebade29d8842a38364ccb13c5ff09284d0d7
Free up bit for regex ANYOF nodes

This commit frees up a bit by using an extra regnode to pass the
information to the regex engine instead of the flag.  I originally
thought that if this was needed, it should be the ANYOF_ABOVE_LATIN1_ALL
bit, as that might speed some things up.  But if we need to do this
again by adding another node to get another bit, we want one that is
mutually exclusive of the first one we did, For otherwise we start
having to make 3 nodes instead of two to get the combinations:
 1 0
 0 1
 1 1

This combinatorial problem is avoided by using bits that are mutually
exclusive, which the ABOVE_LATIN1_ALL isn't, but the one freed by this
commit ANYOF_NON_UTF8_NON_ASCII_ALL is only set under /d matching, and
there are other bits that are set only under /l, so if we need to do
this again, we should use one of those.

I wrote this code when I thought I really needed a bit.  But since, I
have figured out a better way to get the bit needed now.  But I don't
want to lose this code to posterity, so this commit is being made long
enough to get the commit number, then it will be reverted, adding
comments referring to the commit number, so that it can easily be
reconstructed when necessary.
pod/perldebguts.pod
regcomp.c
regcomp.h
regcomp.sym
regexec.c
regnodes.h
t/porting/known_pod_issues.dat