summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-10-16 08:30:15 -0600
committerKarl Williamson <public@khwilliamson.com>2011-10-17 17:04:28 -0600
commit16d951b76390ab0f9abe13820faa4a00c05fd647 (patch)
tree9b5cff528e2a67d070fc89765c2a7d13fe75b20b /regexec.c
parentc49a809bf96a6f9d6e8f048bb237650dc7f6ccf9 (diff)
downloadperl-16d951b76390ab0f9abe13820faa4a00c05fd647.tar.gz
regexec.c: omit goto for the common case
The structure of this code is that initial setup is done and then gotos or fall-through used to join for the main logic. This commit just moves a block, without logic changes, so that the more common case has a fall-through instead of a goto.
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/regexec.c b/regexec.c
index d063308d17..1e4bd629c5 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1463,19 +1463,6 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
folder = foldEQ_latin1; /* /a, except the sharp s one which */
goto do_exactf_non_utf8; /* isn't dealt with by these */
- case EXACTFU:
- if (UTF_PATTERN || utf8_target) {
- utf8_fold_flags = 0;
- goto do_exactf_utf8;
- }
-
- /* Any 'ss' in the pattern should have been replaced by regcomp,
- * so we don't have to worry here about this single special case
- * in the Latin1 range */
- fold_array = PL_fold_latin1;
- folder = foldEQ_latin1;
- goto do_exactf_non_utf8;
-
case EXACTF:
if (UTF_PATTERN || utf8_target) {
utf8_fold_flags = 0;
@@ -1492,6 +1479,19 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
}
fold_array = PL_fold_locale;
folder = foldEQ_locale;
+ goto do_exactf_non_utf8;
+
+ case EXACTFU:
+ if (UTF_PATTERN || utf8_target) {
+ utf8_fold_flags = 0;
+ goto do_exactf_utf8;
+ }
+
+ /* Any 'ss' in the pattern should have been replaced by regcomp,
+ * so we don't have to worry here about this single special case
+ * in the Latin1 range */
+ fold_array = PL_fold_latin1;
+ folder = foldEQ_latin1;
/* FALL THROUGH */