regcomp.c: Move some code to earlier
authorKarl Williamson <public@khwilliamson.com>
Tue, 14 Jan 2014 19:44:03 +0000 (12:44 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 22 Jan 2014 18:45:58 +0000 (11:45 -0700)
This code isn't affect by and doesn't affect things between where it is
being moved to and where it is now.  Moving it will allow simplification
of an expression and also is needed in future commits

regcomp.c

index cd7377e..57a73d8 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -14405,6 +14405,15 @@ parseit:
      * shouldn't.  Therefore we can't invert folded locale now, as it won't be
      * folded until runtime */
 
+    /* If we didn't do folding, it's because some information isn't available
+     * until runtime; set the run-time fold flag for these.  (We don't have to
+     * worry about properties folding, as that is taken care of by the swash
+     * fetching) */
+    if (FOLD && LOC)
+    {
+       ANYOF_FLAGS(ret) |= ANYOF_LOC_FOLD;
+    }
+
     /* Optimize inverted simple patterns (e.g. [^a-z]) when everything is known
      * at compile time.  Besides not inverting folded locale now, we can't
      * invert if there are things such as \w, which aren't known until runtime
@@ -14440,15 +14449,6 @@ parseit:
         return orig_emit;
     }
 
-    /* If we didn't do folding, it's because some information isn't available
-     * until runtime; set the run-time fold flag for these.  (We don't have to
-     * worry about properties folding, as that is taken care of by the swash
-     * fetching) */
-    if (FOLD && LOC)
-    {
-       ANYOF_FLAGS(ret) |= ANYOF_LOC_FOLD;
-    }
-
     /* Some character classes are equivalent to other nodes.  Such nodes take
      * up less room and generally fewer operations to execute than ANYOF nodes.
      * Above, we checked for and optimized into some such equivalents for