diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-05-05 18:40:08 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-06-17 23:25:21 -0600 |
commit | e92587081904f9cc586bf4b6898fec2187a5a95a (patch) | |
tree | c6c795c786bdebaddc538f2925b3da73dcb0dd0b | |
parent | 21339399ecf6ae3a636f01859c6fd863bfac6933 (diff) | |
download | perl-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.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); } |