summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-26 13:49:44 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-26 13:49:44 +0000
commit840fe43365baa830d5f64ca6e8c44e695a8dfb51 (patch)
treec96d14cfd882c4e253e431e2d95df98dc5125bff
parent5edb5b2abb5db9e134cbde1a4d43fd61fa2b229d (diff)
downloadperl-840fe43365baa830d5f64ca6e8c44e695a8dfb51.tar.gz
Some code can be removed following change 33070.
p4raw-id: //depot/perl@33073
-rw-r--r--pp_ctl.c3
-rw-r--r--sv.c10
2 files changed, 7 insertions, 6 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index ec4a9e32b9..5da699358f 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1835,7 +1835,7 @@ PP(pp_enteriter)
register PERL_CONTEXT *cx;
const I32 gimme = GIMME_V;
SV **svp;
- U8 cxtype = 0;
+ U8 cxtype = CXt_LOOP_FOR;
#ifdef USE_ITHREADS
void *iterdata;
#endif
@@ -1873,7 +1873,6 @@ PP(pp_enteriter)
ENTER;
- cxtype |= CXt_LOOP_FOR;
PUSHBLOCK(cx, cxtype, SP);
#ifdef USE_ITHREADS
PUSHLOOP_FOR(cx, iterdata, MARK);
diff --git a/sv.c b/sv.c
index 27805dbb47..925b83e293 100644
--- a/sv.c
+++ b/sv.c
@@ -10544,17 +10544,19 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, CLONE_PARAMS* param)
ncx->blk_eval.cur_text = sv_dup(ncx->blk_eval.cur_text, param);
break;
case CXt_LOOP_LAZYSV:
- ncx->blk_loop.state_u.lazysv.cur
- = sv_dup_inc(ncx->blk_loop.state_u.lazysv.cur, param);
ncx->blk_loop.state_u.lazysv.end
= sv_dup_inc(ncx->blk_loop.state_u.lazysv.end, param);
- goto dup_cxt_loop;
+ /* We are taking advantage of av_dup_inc and sv_dup_inc
+ actually being the same function, and order equivalance of
+ the two unions.
+ We can assert the later [but only at run time :-(] */
+ assert ((void *) &ncx->blk_loop.state_u.ary.ary ==
+ (void *) &ncx->blk_loop.state_u.lazysv.cur);
case CXt_LOOP_FOR:
ncx->blk_loop.state_u.ary.ary
= av_dup_inc(ncx->blk_loop.state_u.ary.ary, param);
case CXt_LOOP_LAZYIV:
case CXt_LOOP_PLAIN:
- dup_cxt_loop:
ncx->blk_loop.iterdata = (CxPADLOOP(ncx)
? ncx->blk_loop.iterdata
: gv_dup((GV*)ncx->blk_loop.iterdata,