diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-10-16 08:30:15 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-10-17 17:04:28 -0600 |
commit | 16d951b76390ab0f9abe13820faa4a00c05fd647 (patch) | |
tree | 9b5cff528e2a67d070fc89765c2a7d13fe75b20b /regexec.c | |
parent | c49a809bf96a6f9d6e8f048bb237650dc7f6ccf9 (diff) | |
download | perl-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.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -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 */ |