This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Remove FOLDCHAR generation
authorKarl Williamson <public@khwilliamson.com>
Sun, 20 Mar 2011 17:32:11 +0000 (11:32 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sun, 20 Mar 2011 18:16:13 +0000 (12:16 -0600)
commite286af2d135c6b1b03be2bd322f22f89e1b1aa5d
tree844c6a3e481969052806d93037c6b1d021cf455d
parent1d4120df745f39cf0ba70379a5bed371bf4c61f4
regcomp.c: Remove FOLDCHAR generation

ANYOFV handles multi-char folds in ANYOF nodes, and it turns
out it is a superset of what FOLDCHAR does, which never got fully
implemented in regexec.c, whereas ANYOFV is.  FOLDCHAR may be the better
way to go in the long-term, as it takes less space and is faster, but
this gives us the functionality today, with no extra work.

FOLDCHAR had been generated only when the character in question is a
literal in the input stream, and wasn't touched for the probably more
common use of \N{} or \x, which were fixed from not doing anything
special to using ANYOFV earlier in the 5.13 series, and it turns out
that the code that does it all is in a part of the code that gets
executed anyway, so that simply removing the special FOLDCHAR code
causes execution to drop down to this code.

I'm thinking at the moment that for 5.16, ANYOV should be removed in
favor of branches, using the technique of recursion that has recently
been added to \N{}.  That would enable easier trie generation and
simplify things in regexec and the optimizer.
regcomp.c