diff options
author | Karl Williamson <public@khwilliamson.com> | 2010-11-14 10:37:41 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-11-22 13:32:53 -0800 |
commit | ef87b810d4ce2a22ca2d29a43907edb11b57b933 (patch) | |
tree | 3e01fa5fb0f8b85609d577fd3fdc6f55a3bd45fd /regcomp.h | |
parent | 3e81b2d9f833beb8b7ae28a3f7a705f3232409bd (diff) | |
download | perl-ef87b810d4ce2a22ca2d29a43907edb11b57b933.tar.gz |
Split ANYOF_NONBITMAP into two components
ANYOF_NONBITMAP means that the node can match things that aren't in its
bitmap. Some things can match only when the target string is in utf8,
and some things can match even if it isn't. If the target string is not
in utf8, and we know that the only possible match is when it is in utf8,
we know it can't match, and avoid a fruitless, expensive swash load.
This change also fixes a number of problems shown in t/re/grind_fold.t
that I will deliver soon.
Diffstat (limited to 'regcomp.h')
-rw-r--r-- | regcomp.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -323,8 +323,14 @@ struct regnode_charclass_class { #define ANYOF_CLASS ANYOF_LOCALE #define ANYOF_LARGE ANYOF_CLASS /* Same; name retained for back compat */ +/* Can match something outside the bitmap that is expressible only in utf8 */ +#define ANYOF_UTF8 0x10 + +/* Can match something outside the bitmap that isn't in utf8 */ +#define ANYOF_NONBITMAP_NON_UTF8 0x20 + /* Set if the bitmap doesn't fully represent what this node can match */ -#define ANYOF_NONBITMAP 0x20 +#define ANYOF_NONBITMAP (ANYOF_UTF8|ANYOF_NONBITMAP_NON_UTF8) #define ANYOF_UNICODE ANYOF_NONBITMAP /* old name, for back compat */ /* Matches every code point 0x100 and above*/ |