summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-10-17 13:15:06 +0100
committerDavid Mitchell <davem@iabyn.com>2016-02-03 09:18:30 +0000
commit0925dc7fc4dca2e6b5f629d00032568d5bcc2c5b (patch)
treefbebd929891630cd548efcebba584d11d89f1378 /scope.c
parent1bef65a2c897ceb4139a39df14a8514b260493bd (diff)
downloadperl-0925dc7fc4dca2e6b5f629d00032568d5bcc2c5b.tar.gz
PUSHLOOP_PLAIN: don't set unused fields
Currently PUSHLOOP_PLAIN sets a whole unch of fields that it isn't going to ue to NULL or 0, e.g. blk_loop.itersave. Skip this and leave them wild. Make cx_dump() not try to dump them for CXt_LOOP_PLAIN
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/scope.c b/scope.c
index 0188dd1602..6881923cd0 100644
--- a/scope.c
+++ b/scope.c
@@ -1374,13 +1374,17 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
PerlIO_printf(Perl_debug_log, "BLK_LOOP.LABEL = %s\n", CxLABEL(cx));
PerlIO_printf(Perl_debug_log, "BLK_LOOP.MY_OP = 0x%"UVxf"\n",
PTR2UV(cx->blk_loop.my_op));
- /* XXX: not accurate for LAZYSV/IV */
- PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%"UVxf"\n",
- PTR2UV(cx->blk_loop.state_u.ary.ary));
- PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERIX = %ld\n",
- (long)cx->blk_loop.state_u.ary.ix);
- PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n",
- PTR2UV(CxITERVAR(cx)));
+ if (CxTYPE(cx) != CXt_LOOP_PLAIN) {
+ PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERVAR = 0x%"UVxf"\n",
+ PTR2UV(CxITERVAR(cx)));
+ PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERSAVE = 0x%"UVxf"\n",
+ PTR2UV(cx->blk_loop.itersave));
+ /* XXX: not accurate for LAZYSV/IV/LIST */
+ PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERARY = 0x%"UVxf"\n",
+ PTR2UV(cx->blk_loop.state_u.ary.ary));
+ PerlIO_printf(Perl_debug_log, "BLK_LOOP.ITERIX = %ld\n",
+ (long)cx->blk_loop.state_u.ary.ix);
+ }
break;
case CXt_SUBST: