summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-10-17 12:56:15 +0100
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:18:30 +0000
commit1bef65a2c897ceb4139a39df14a8514b260493bd (patch)
tree84844d6a1097fd8fee39e093df06f2bc043955c8 /scope.c
parent8a1f10dd1e1964fa64cd0dff7196cf3f1f503ae1 (diff)
downloadperl-1bef65a2c897ceb4139a39df14a8514b260493bd.tar.gz
Eliminate cx->blk_loop.resetsp
Of all the loop types, only CXt_LOOP_LIST, i.e. for (1,2,3) {}, needs to keep anything on the stack, i.e. for all the others, cx->blk_loop.resetsp can always equal cx->blk_oldsp. For CXt_LOOP_LIST, the same value as resetsp is stored as blk_loop.state_u.stack.basesp. So we can eliminate the resetsp field. This is good as the loop substruct is the largest (ITHREADS) or joint largest with eval (non-threaded). Also, we now don't have to store that value for non-CXt_LOOP_LIST loops. The downside is we now have to choose between basesp and oldsp in pp_leaveloop and pp_last, based on CX type.
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/scope.c b/scope.c
index 08456d4645..0188dd1602 100644
--- a/scope.c
+++ b/scope.c
@@ -1372,8 +1372,6 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
case CXt_LOOP_LIST:
case CXt_LOOP_ARY:
PerlIO_printf(Perl_debug_log, "BLK_LOOP.LABEL = %s\n", CxLABEL(cx));
- PerlIO_printf(Perl_debug_log, "BLK_LOOP.RESETSP = %ld\n",
- (long)cx->blk_loop.resetsp);
PerlIO_printf(Perl_debug_log, "BLK_LOOP.MY_OP = 0x%"UVxf"\n",
PTR2UV(cx->blk_loop.my_op));
/* XXX: not accurate for LAZYSV/IV */