From: Dave Mitchell Date: Sat, 30 Sep 2006 00:29:10 +0000 (+0000) Subject: assert that backing up outercc->cur in regmatch()/WHILEM is not needed X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=02d469982cfdfda685d1a8f418b9bcf1ab60c6d7;p=p5sagit%2Fp5-mst-13.2.git assert that backing up outercc->cur in regmatch()/WHILEM is not needed p4raw-id: //depot/perl@28907 --- diff --git a/regexec.c b/regexec.c index be64fa6..de38316 100644 --- a/regexec.c +++ b/regexec.c @@ -3678,7 +3678,7 @@ S_regmatch(pTHX_ const regmatch_info *reginfo, regnode *prog) if (result) sayYES; if (cur_curlyx->u.curlyx.outercc) - cur_curlyx->u.curlyx.outercc->u.curlyx.cur = st->ln; + assert(cur_curlyx->u.curlyx.outercc->u.curlyx.cur == st->ln); sayNO; } @@ -3763,7 +3763,7 @@ S_regmatch(pTHX_ const regmatch_info *reginfo, regnode *prog) REGCP_UNWIND(st->u.whilem.lastcp); regcppop(rex); if (cur_curlyx->u.curlyx.outercc) - cur_curlyx->u.curlyx.outercc->u.curlyx.cur = st->ln; + assert(cur_curlyx->u.curlyx.outercc->u.curlyx.cur == st->ln); if (n >= cur_curlyx->u.curlyx.max) { /* Maximum greed exceeded? */ if (ckWARN(WARN_REGEXP) && n >= REG_INFTY @@ -3841,7 +3841,7 @@ S_regmatch(pTHX_ const regmatch_info *reginfo, regnode *prog) if (result) sayYES; if (cur_curlyx->u.curlyx.outercc) - cur_curlyx->u.curlyx.outercc->u.curlyx.cur = st->ln; + assert(cur_curlyx->u.curlyx.outercc->u.curlyx.cur == st->ln); cur_curlyx->u.curlyx.cur = n - 1; cur_curlyx->u.curlyx.lastloc = st->u.whilem.lastloc; CACHEsayNO;