From: Nicholas Clark Date: Sun, 20 Jan 2008 20:40:38 +0000 (+0000) Subject: Eliminate label from struct block_loop, as it can be accessed via X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a61a7064557baa67e0ffb901e9b818027edd3eb7;p=p5sagit%2Fp5-mst-13.2.git Eliminate label from struct block_loop, as it can be accessed via oldcop. p4raw-id: //depot/perl@33015 --- diff --git a/cop.h b/cop.h index 778ffac..f8b32f8 100644 --- a/cop.h +++ b/cop.h @@ -427,7 +427,6 @@ struct block_eval { /* 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 @@ struct block_loop { 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 @@ struct block_loop { #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; \ diff --git a/pp_ctl.c b/pp_ctl.c index c596fdb..d1b0877 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1257,9 +1257,9 @@ S_dopoptolabel(pTHX_ const char *label) 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));