From: Nicholas Clark Date: Sat, 26 Jan 2008 13:49:44 +0000 (+0000) Subject: Some code can be removed following change 33070. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=840fe43365baa830d5f64ca6e8c44e695a8dfb51;p=p5sagit%2Fp5-mst-13.2.git Some code can be removed following change 33070. p4raw-id: //depot/perl@33073 --- diff --git a/pp_ctl.c b/pp_ctl.c index ec4a9e3..5da6993 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 27805db..925b83e 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,