Change 33015 by [EMAIL PROTECTED] on 2008/01/20 20:40:38

        Eliminate label from struct block_loop, as it can be accessed via
        oldcop.

Affected files ...

... //depot/perl/cop.h#151 edit
... //depot/perl/pp_ctl.c#659 edit

Differences ...

==== //depot/perl/cop.h#151 (text) ====
Index: perl/cop.h
--- perl/cop.h#150~33014~       2008-01-20 11:56:21.000000000 -0800
+++ perl/cop.h  2008-01-20 12:40:38.000000000 -0800
@@ -427,7 +427,6 @@
 
 /* loop context */
 struct block_loop {
-    char *     label;
     I32                resetsp;
     LOOP *     my_op;  /* My op, that contains redo, next and last ops.  */
     /* (except for non_ithreads we need to modify next_op in pp_ctl.c, hence
@@ -485,7 +484,7 @@
        else                                                            \
            cx->blk_loop.itersave = NULL;
 #endif
-#define CxLABEL(c)     (0 + (c)->blk_loop.label)
+#define CxLABEL(c)     (0 + (c)->blk_oldcop->cop_label)
 
 #ifdef USE_ITHREADS
 #  define PUSHLOOP_OP_NEXT             /* No need to do anything.  */
@@ -496,7 +495,6 @@
 #endif
 
 #define PUSHLOOP(cx, dat, s)                                           \
-       cx->blk_loop.label = PL_curcop->cop_label;                      \
        cx->blk_loop.resetsp = s - PL_stack_base;                       \
        cx->blk_loop.my_op = cLOOP;                                     \
        PUSHLOOP_OP_NEXT;                                               \

==== //depot/perl/pp_ctl.c#659 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#658~32979~    2008-01-15 03:11:07.000000000 -0800
+++ perl/pp_ctl.c       2008-01-20 12:40:38.000000000 -0800
@@ -1257,9 +1257,9 @@
                return -1;
            break;
        case CXt_LOOP:
-           if ( !cx->blk_loop.label || strNE(label, cx->blk_loop.label) ) {
+           if ( !CxLABEL(cx) || strNE(label, CxLABEL(cx)) ) {
                DEBUG_l(Perl_deb(aTHX_ "(Skipping label #%ld %s)\n",
-                       (long)i, cx->blk_loop.label));
+                       (long)i, CxLABEL(cx)));
                continue;
            }
            DEBUG_l( Perl_deb(aTHX_ "(Found label #%ld %s)\n", (long)i, label));
End of Patch.

Reply via email to