summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2017-02-17 19:46:15 -0600
committerDavid Mitchell <davem@iabyn.com>2017-02-18 12:19:54 +0000
commit19742f39bfbfba7529a49232271b390bc4e811cb (patch)
tree7c4bc6dcc2549314279de41e4b84ca22d3af270e /pp_hot.c
parentd8f2fe0966b076afb4b85eb04d1524b6af37e344 (diff)
downloadperl-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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 7d6db0f4f0..58bbe2f1e9 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -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);