summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-06-09 18:43:59 +0000
committerNicholas Clark <nick@ccl4.org>2008-06-09 18:43:59 +0000
commit3a92e6ae8711ddb5b5574745041a3e03a98b1f1c (patch)
treeb3276c489537995031a670e8d1af4bdaab6582d2 /regcomp.c
parent3ec35e0f92217816d70cf483b3b012476ca9b9d7 (diff)
downloadperl-3a92e6ae8711ddb5b5574745041a3e03a98b1f1c.tar.gz
Strength reduction optimisation seems to spot that a = a + 1; is just
a++; so write it as the former, to keep PERL_DEBUG_COW happy. p4raw-id: //depot/perl@34039
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/regcomp.c b/regcomp.c
index 6a77d5566f..73fce854d3 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -5669,11 +5669,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
pv = (I32*)SvGROW(sv_dat, SvCUR(sv_dat) + sizeof(I32)+1);
SvCUR_set(sv_dat, SvCUR(sv_dat) + sizeof(I32));
pv[count] = RExC_npar;
-#ifdef PERL_DEBUG_COW
- ((XPVIV*) SvANY(sv_dat))->xiv_iv++;
-#else
- SvIVX(sv_dat)++;
-#endif
+ SvIV_set(sv_dat, SvIVX(sv_dat) + 1);
}
} else {
(void)SvUPGRADE(sv_dat,SVt_PVNV);