regcomp.h: Restore separate bit for LOC class
authorKarl Williamson <public@khwilliamson.com>
Tue, 23 Nov 2010 00:41:23 +0000 (17:41 -0700)
committerDavid Golden <dagolden@cpan.org>
Tue, 23 Nov 2010 01:19:08 +0000 (20:19 -0500)
commit1eb41b0abe1a265118fa38f67089e4aef313f69b
tree024988b90f29905323fd9c6609fbeadc5e5896de
parent99ee976292c47b41b12e66dc2a0fea4a98c9ab9f
regcomp.h: Restore separate bit for LOC class

This commit partially reverts cefafd73018b048fa66d2b22250431112141955a
which unconditionally used a bitmap for classes like \w in ANYOF nodes
used in locales.  Unfortunately, I forgot to unconditionally allocate
that space, so things were getting corrupted.  It is scary that that did
not show up in my testing, but locales are hard to test.  It showed up
in a workspace without DEBUGGING.

This commit now causes the bitmap to be used only when necessary, at the
expense of using a precious bit in the flags field to indicate that it
is being used.  However, as events have turned out since that commit,
that flags bit isn't as precious as I thought.  It looks like we will
have to split the ANYOF node into two similar nodes, one of which is
variable length, as there are bugs due to the optimizer thinking it is
of length 1, when in fact it doesn't currently have to be.   That split
should allow more bits to be freed.

I'm retaining for now some ancillary code that was to help improve the
efficiency when that bit was removed; just in case we have to redo this.
But if we do, we have to unconditionally allocate the space we think we
are using.

Signed-off-by: David Golden <dagolden@cpan.org>
regcomp.h