diff options
author | Zefram <zefram@fysh.org> | 2017-11-29 19:27:49 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-11-29 19:27:49 +0000 |
commit | 619bbb9ab0f3cffda05f980b2ebb5bf660ad6962 (patch) | |
tree | cf70aae25e996d4bb11db230639148fc32ed0c61 /scope.c | |
parent | df16d5564aa82a94953a0bccfc9917bc140ead02 (diff) | |
download | perl-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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", |