This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert regnode to a flag for [...]
authorKarl Williamson <public@khwilliamson.com>
Tue, 26 Nov 2013 02:40:12 +0000 (19:40 -0700)
committerKarl Williamson <public@khwilliamson.com>
Tue, 31 Dec 2013 15:27:20 +0000 (08:27 -0700)
commitae98608918f0b92985b47a5ac2987ebd9797be4c
tree040697220e48491e0e5999b96116a2c0b69a0e40
parenteff8b7dc9a14f3aa38ddb85d01d614da4c6d8957
Convert regnode to a flag for [...]

Prior to this commit, there were 3 types of ANYOF nodes; now there are
two: regular, and one for the synthetic start class (ssc).  This commit
converted the third type dealing with warning about matching \p{}
against non-Unicode code points, into using the spare flag bit for ANYOF
nodes.

This allows this bit to apply to ssc ANYOF nodes, whereas previously it
couldn't.  There is a bug in which the warning isn't raised if the match
is rejected by the optimizer, because of this inability.  This bug will
be fixed in a later commit.

Another option would have been to create a new node-type which was an
ANYOF_SSC_WARN_SUPER node.  But this adds extra complications to things;
and we have a spare bit that we might as well use.  The comments give
better possibilities for freeing up 2 bits should they be needed.
pod/perldebguts.pod
regcomp.c
regcomp.h
regcomp.sym
regexec.c
regnodes.h
t/lib/warnings/utf8