regcomp.h: Free up bit; downside is makes locale ANYOF nodes large
authorKarl Williamson <public@khwilliamson.com>
Sun, 15 Jul 2012 22:11:45 +0000 (16:11 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 19 Jul 2012 15:39:06 +0000 (09:39 -0600)
commit8b27d3db700fc2fce268e3d78e221a16ccaca2e8
tree5c0eb906bbd3391361d7e06c6a9798533c5df1cb
parentc8c10c2ff3acbb5b933bbbd2eb5b4f3c49608e42
regcomp.h: Free up bit; downside is makes locale ANYOF nodes large

There have been two flavors of ANYOF nodes under /l (locale) (for
bracketed character classes).  If a class didn't try to match things
like [:word:], it was smaller by 4 bytes than one that did.

A flag bit was used to indicate which size it was.  By making all such
nodes the larger size, whether needed or not, that bit can be freed to
be used for other purposes.

This only affects ANYOF nodes compiled under locale rules.  The hope is
to eventually git rid of these nodes anyway, by taking the suggestion of
Yves Orton to compile regular expressions using the current locale, and
automatically recompile the next time they are used after the locale
changes.

This commit is somewhat experimental, done early in the development
cycle to see if there are any breakages.  There are other ways to free
up a bit, as explained in the comments.  Best would be to split off
nodes that match everything outside Latin1, freeing up the
ANYOF_UNICODE_ALL bit.  However, there currently would need to be two
flavors of this, one also for ANYOFV.  I'm currently working to
eliminate the need for ANYOFV nodes (which aren't sufficient,
[perl #89774]), so it's easiest to wait for this work to be done before
doing the split, after which we can revert this change in order to gain
back the space, but in the meantime, this will have had the opportunity
to smoke out issues that I would like to know about.
regcomp.c
regcomp.h