Change 33073 by [EMAIL PROTECTED] on 2008/01/26 13:49:44

        Some code can be removed following change 33070.

Affected files ...

... //depot/perl/pp_ctl.c#677 edit
... //depot/perl/sv.c#1499 edit

Differences ...

==== //depot/perl/pp_ctl.c#677 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#676~33070~    2008-01-26 01:34:13.000000000 -0800
+++ perl/pp_ctl.c       2008-01-26 05:49:44.000000000 -0800
@@ -1835,7 +1835,7 @@
     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 @@
 
     ENTER;
 
-    cxtype |= CXt_LOOP_FOR;
     PUSHBLOCK(cx, cxtype, SP);
 #ifdef USE_ITHREADS
     PUSHLOOP_FOR(cx, iterdata, MARK);

==== //depot/perl/sv.c#1499 (text) ====
Index: perl/sv.c
--- perl/sv.c#1498~33070~       2008-01-26 01:34:13.000000000 -0800
+++ perl/sv.c   2008-01-26 05:49:44.000000000 -0800
@@ -10544,17 +10544,19 @@
                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,
End of Patch.

Reply via email to