summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-11-15 12:38:20 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-11-22 13:32:55 -0800
commit1d5eda9d3b3387f7994e7f9420d24b6846e8e093 (patch)
tree21616ff211347ec9a46eed08a582a8f86974a8ad /regcomp.c
parent3366dfc64be644770fc494fbe1514173c88fca77 (diff)
downloadperl-1d5eda9d3b3387f7994e7f9420d24b6846e8e093.tar.gz
regcomp.c: Add comment
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index 5ec58cccd2..59f8bcf8b8 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -8741,8 +8741,14 @@ parseit:
if( stored == 1 && (value < 128 || (value < 256 && !UTF))
&& !( ANYOF_FLAGS(ret) & ( ANYOF_FLAGS_ALL ^ ANYOF_FOLD ) )
) {
- /* optimize single char class to an EXACT node
- but *only* when its not a UTF/high char */
+ /* optimize single char class to an EXACT node but *only* when its not
+ * a UTF/high char. Note that the information needed to decide to do
+ * this optimization is not currently available until the 2nd pass, and
+ * that the actually used EXACT node takes less space than the
+ * calculated ANYOF node, and hence the amount of space calculated in
+ * the first pass is larger than actually used. Currently we don't
+ * keep track of enough information to do this for nodes which contain
+ * matches outside the bitmap */
const char * cur_parse= RExC_parse;
RExC_emit = (regnode *)orig_emit;
RExC_parse = (char *)orig_parse;