summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-05-05 18:40:08 -0600
committerKarl Williamson <public@khwilliamson.com>2013-06-17 23:25:21 -0600
commite92587081904f9cc586bf4b6898fec2187a5a95a (patch)
treec6c795c786bdebaddc538f2925b3da73dcb0dd0b
parent21339399ecf6ae3a636f01859c6fd863bfac6933 (diff)
downloadperl-e92587081904f9cc586bf4b6898fec2187a5a95a.tar.gz
regcomp.c: Reorder tests to avoid throwing away work.
Prior to this patch, we did work based on a test that could be thrown away as a result of the next test. This reorders so that doesn't happen
-rw-r--r--regcomp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/regcomp.c b/regcomp.c
index 0033805ef9..e660e5e5d3 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -11343,12 +11343,6 @@ tryagain:
loopdone: /* Jumped to when encounters something that shouldn't be in
the node */
- /* If 'maybe_exact' is still set here, means there are no
- * code points in the node that participate in folds */
- if (FOLD && maybe_exact) {
- OP(ret) = EXACT;
- }
-
/* I (khw) don't know if you can get here with zero length, but the
* old code handled this situation by creating a zero-length EXACT
* node. Might as well be NOTHING instead */
@@ -11356,6 +11350,12 @@ tryagain:
OP(ret) = NOTHING;
}
else{
+
+ /* If 'maybe_exact' is still set here, means there are no
+ * code points in the node that participate in folds */
+ if (FOLD && maybe_exact) {
+ OP(ret) = EXACT;
+ }
alloc_maybe_populate_EXACT(pRExC_state, ret, flagp, len, ender);
}