diff options
author | Andy Lester <andy@petdance.com> | 2017-02-17 19:46:15 -0600 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-02-18 12:19:54 +0000 |
commit | 19742f39bfbfba7529a49232271b390bc4e811cb (patch) | |
tree | 7c4bc6dcc2549314279de41e4b84ca22d3af270e /pp_hot.c | |
parent | d8f2fe0966b076afb4b85eb04d1524b6af37e344 (diff) | |
download | perl-19742f39bfbfba7529a49232271b390bc4e811cb.tar.gz |
Moving variables to their innermost scope.
Some vars have been tagged as const because they do not change in their
new scopes. In pp_reverse in pp.c, I32 tmp is only used to hold a char,
so is changed to char.
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -360,7 +360,6 @@ PP(pp_padrange) dSP; PADOFFSET base = PL_op->op_targ; int count = (int)(PL_op->op_private) & OPpPADRANGE_COUNTMASK; - int i; if (PL_op->op_flags & OPf_SPECIAL) { /* fake the RHS of my ($x,$y,..) = @_ */ PUSHMARK(SP); @@ -370,6 +369,8 @@ PP(pp_padrange) /* note, this is only skipped for compile-time-known void cxt */ if ((PL_op->op_flags & OPf_WANT) != OPf_WANT_VOID) { + int i; + EXTEND(SP, count); PUSHMARK(SP); for (i = 0; i <count; i++) @@ -381,6 +382,8 @@ PP(pp_padrange) (base << (OPpPADRANGE_COUNTSHIFT + SAVE_TIGHT_SHIFT)) | (count << SAVE_TIGHT_SHIFT) | SAVEt_CLEARPADRANGE); + int i; + STATIC_ASSERT_STMT(OPpPADRANGE_COUNTMASK + 1 == (1 << OPpPADRANGE_COUNTSHIFT)); assert((payload >> (OPpPADRANGE_COUNTSHIFT+SAVE_TIGHT_SHIFT)) == (Size_t)base); |