summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-03-17 10:24:28 -0600
committerKarl Williamson <public@khwilliamson.com>2011-03-17 11:00:50 -0600
commit3fffb88a6cabe9bc42e2a62f0ab7442ba6850dd0 (patch)
tree66e6ac2fdec3b07d7e52cbe5df8c8f9c3574ff35 /embed.fnc
parent77dc54c8ed3f77947d97b9085c718de3fc7fb81f (diff)
downloadperl-3fffb88a6cabe9bc42e2a62f0ab7442ba6850dd0.tar.gz
regcomp.c: Avoid locale in optimizer unless necessary
This is further work along the lines in RT #85964 and commit af302e7fa58415c2d8454c8cbef7bccd8b504257. It reverts, for the the most part, commits aa19b56b2f07e9eabf57540f00d312d8093e9d28 (Remove unused parameter) and c613755a4b4fc8e64a77639d47d7e208fee68edc (/l in synthetic start class). Those commits caused the synthetic start class to often be marked as matching under locale rules, even if there was no part of the regular expression that used locale. This led to RT #85964, which made apparent that there were a number of assumptions in the optimizer about locale that were no longer necessarily true. This new commit changes things so that locale has to be somewhere in the regex in order to get the synthetic start class to include /l. In other words, this reverts the effect of those commits to regular expression which have /l -- we go back to the old way of doing things for non-locale regexes. This limits any bugs that may have been introduced by the addition of /l (and being able to match only sub-parts of a regex under locale) to the relatively uncommon regexes which actually use it. There are a number of bugs that have surfaced for the locale rules regexes that have gone unreported; and some say locale rules regexes should be deprecated.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc6
1 files changed, 4 insertions, 2 deletions
diff --git a/embed.fnc b/embed.fnc
index 1a0c4373fe..cc748c8fb9 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1803,13 +1803,15 @@ Es |bool |reg_skipcomment|NN struct RExC_state_t *pRExC_state
Es |void |scan_commit |NN const struct RExC_state_t *pRExC_state \
|NN struct scan_data_t *data|NN I32 *minlenp \
|int is_inf
-Esn |void |cl_anything |NN struct regnode_charclass_class *cl
+Esn |void |cl_anything |NN const struct RExC_state_t *pRExC_state \
+ |NN struct regnode_charclass_class *cl
EsRn |int |cl_is_anything |NN const struct regnode_charclass_class *cl
Esn |void |cl_init |NN const struct RExC_state_t *pRExC_state \
|NN struct regnode_charclass_class *cl
Esn |void |cl_and |NN struct regnode_charclass_class *cl \
|NN const struct regnode_charclass_class *and_with
-Esn |void |cl_or |NN struct regnode_charclass_class *cl \
+Esn |void |cl_or |NN const struct RExC_state_t *pRExC_state \
+ |NN struct regnode_charclass_class *cl \
|NN const struct regnode_charclass_class *or_with
Es |I32 |study_chunk |NN struct RExC_state_t *pRExC_state \
|NN regnode **scanp|NN I32 *minlenp \