summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-11-29 19:27:49 +0000
committerZefram <zefram@fysh.org>2017-11-29 19:27:49 +0000
commit619bbb9ab0f3cffda05f980b2ebb5bf660ad6962 (patch)
treecf70aae25e996d4bb11db230639148fc32ed0c61 /scope.c
parentdf16d5564aa82a94953a0bccfc9917bc140ead02 (diff)
downloadperl-619bbb9ab0f3cffda05f980b2ebb5bf660ad6962.tar.gz
make loop control apply to "given"
A "given" construct is now officially a one-iteration loop.
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 3fef7a2326..b09a25dbb3 100644
--- a/scope.c
+++ b/scope.c
@@ -1530,6 +1530,7 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
PTR2UV(cx->blk_eval.retop));
break;
+ case CXt_LOOP_GIVEN:
case CXt_LOOP_PLAIN:
case CXt_LOOP_LAZYIV:
case CXt_LOOP_LAZYSV:
@@ -1543,7 +1544,8 @@ Perl_cx_dump(pTHX_ PERL_CONTEXT *cx)
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 */
+ }
+ if (CxTYPE(cx) == CXt_LOOP_ARY) {
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",