summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-12-15 18:34:59 -0700
committerKarl Williamson <public@khwilliamson.com>2010-12-20 16:05:35 -0700
commit390656605358790e356331349a2f922ae36ae5df (patch)
tree1bb444ae420b11af97ee5cbc3560144db454e3ac /regexec.c
parentf53580fec42f3b12264ee27b756dec257c0bb77a (diff)
downloadperl-390656605358790e356331349a2f922ae36ae5df.tar.gz
Change name of regex intrnl macro to new meaning
ANYOF_FOLD is now used only under fewer conditions. Otherwise the bitmap of character 0-255 is fully calculated with the folds, and the flag is not set. One condition is under locale, where the folds aren't known at compile time; the other is for things accessible through a swash. By changing the name to its new meaning, certain optimizations become more obvious.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index 7778992a63..a4b4fba23f 100644
--- a/regexec.c
+++ b/regexec.c
@@ -6339,7 +6339,7 @@ S_reginclass(pTHX_ const regexp * const prog, register const regnode * const n,
if (c < 256) {
if (ANYOF_BITMAP_TEST(n, c))
match = TRUE;
- else if (flags & ANYOF_FOLD) {
+ else if (flags & ANYOF_LOC_NONBITMAP_FOLD) {
U8 f;
if (flags & ANYOF_LOCALE) {
@@ -6397,7 +6397,7 @@ S_reginclass(pTHX_ const regexp * const prog, register const regnode * const n,
if (!match) {
if (utf8_target && (flags & ANYOF_UNICODE_ALL)) {
if (c >= 256
- || ((flags & ANYOF_FOLD) /* Latin1 1 that has a non-Latin1 fold
+ || ((flags & ANYOF_LOC_NONBITMAP_FOLD) /* Latin1 1 that has a non-Latin1 fold
should match */
&& _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(c)))
{
@@ -6420,7 +6420,7 @@ S_reginclass(pTHX_ const regexp * const prog, register const regnode * const n,
}
if (swash_fetch(sw, utf8_p, 1))
match = TRUE;
- else if (flags & ANYOF_FOLD) {
+ else if (flags & ANYOF_LOC_NONBITMAP_FOLD) {
if (!match && lenp && av) {
I32 i;
for (i = 0; i <= av_len(av); i++) {