summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2012-04-01 13:04:05 +0100
committerDavid Mitchell <davem@iabyn.com>2012-06-13 13:32:50 +0100
commit471f538719f520bc908ac57ec9f3cb8526773f10 (patch)
treec03fa0b4717d686624730ca9b9d465daa3bb0763 /regcomp.c
parentfca7221246069070a65ab8fbc4fa10405266be20 (diff)
downloadperl-471f538719f520bc908ac57ec9f3cb8526773f10.tar.gz
eliminate REG_SEEN_EVAL
This flag was set during pattern compilation if a (?{}) was encountered; but is redundant now that we have pRExC_state->num_code_blocks.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/regcomp.c b/regcomp.c
index b9f9e4194d..7827bb346a 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6073,7 +6073,7 @@ reStudy:
else if ((!sawopen || !RExC_sawback) &&
(OP(first) == STAR &&
PL_regkind[OP(NEXTOPER(first))] == REG_ANY) &&
- !(r->extflags & RXf_ANCH) && !(RExC_seen & REG_SEEN_EVAL))
+ !(r->extflags & RXf_ANCH) && !pRExC_state->num_code_blocks)
{
/* turn .* into ^.* with an implied $*=1 */
const int type =
@@ -6086,7 +6086,7 @@ reStudy:
goto again;
}
if (sawplus && !sawlookahead && (!sawopen || !RExC_sawback)
- && !(RExC_seen & REG_SEEN_EVAL)) /* May examine pos and $& */
+ && !pRExC_state->num_code_blocks) /* May examine pos and $& */
/* x+ must match at the 1st pos of run of x's */
r->intflags |= PREGf_SKIP;
@@ -6359,7 +6359,7 @@ reStudy:
r->extflags |= RXf_GPOS_SEEN;
if (RExC_seen & REG_SEEN_LOOKBEHIND)
r->extflags |= RXf_LOOKBEHIND_SEEN;
- if (RExC_seen & REG_SEEN_EVAL)
+ if (pRExC_state->num_code_blocks)
r->extflags |= RXf_EVAL_SEEN;
if (RExC_seen & REG_SEEN_CANY)
r->extflags |= RXf_CANY_SEEN;
@@ -8581,7 +8581,6 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
struct reg_code_block *cb;
RExC_seen_zerolen++;
- RExC_seen |= REG_SEEN_EVAL;
if ( !pRExC_state->num_code_blocks
|| pRExC_state->code_index >= pRExC_state->num_code_blocks