regcomp.c: Optimizer wrongly turning off bit
authorKarl Williamson <public@khwilliamson.com>
Sun, 14 Nov 2010 17:32:28 +0000 (10:32 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 22 Nov 2010 21:32:53 +0000 (13:32 -0800)
ANYOF_UNICODE_ALL and ANYOF_NONBITMAP are not mutually exclusive, so
there is no need for the optimizer to make them so.

regcomp.c

index 7f0e582..da71538 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -857,12 +857,10 @@ S_cl_or(const RExC_state_t *pRExC_state, struct regnode_charclass_class *cl, con
     if (cl->flags & ANYOF_NONBITMAP && or_with->flags & ANYOF_NONBITMAP &&
        ARG(cl) != ARG(or_with)) {
        cl->flags |= ANYOF_UNICODE_ALL;
-       cl->flags &= ~ANYOF_NONBITMAP;
     }
 
     if (or_with->flags & ANYOF_UNICODE_ALL) {
        cl->flags |= ANYOF_UNICODE_ALL;
-       cl->flags &= ~ANYOF_NONBITMAP;
     }
 }