This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
rename POPFOO() to CX_POPFOO()
authorDavid Mitchell <davem@iabyn.com>
Fri, 25 Dec 2015 11:07:28 +0000 (11:07 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 3 Feb 2016 09:19:17 +0000 (09:19 +0000)
Rename all the context-popping macros such as POPBLOCK and POPSUB, by
giving them a CX_ prefix. (Do TOPBLOCK too).

This is principally to  deliberately break any existing non-core use of
these non-API macros, as their behaviour has changed in this branch.
In particular, POPBLOCK(cx) no longer decrements the cxt stack pointer
nor sets cx; instead, cx is now expected to already point to the stack
frame which POPBLOCK should process.

At the same time, giving them a CX_ prefix makes it clearer that these
are all part of a family of macros that manipulate the context stack.

The PUSHFOO() macros will be renamed in a later commit.

cop.h
ext/XS-APItest/APItest.xs
op.c
perl.c
pp.c
pp_ctl.c
pp_hot.c
pp_sort.c
pp_sys.c
scope.c
t/op/args.t

diff --git a/cop.h b/cop.h
index b7727d9..5071ec9 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -647,7 +647,7 @@ struct block_format {
        SvREFCNT_inc_void(cx->blk_format.dfoutgv)
 
 /* Restore old @_ */
-#define POP_SAVEARRAY(cx)                                              \
+#define CX_POP_SAVEARRAY(cx)                                           \
     STMT_START {                                                       \
         AV *av = GvAV(PL_defgv);                                        \
        GvAV(PL_defgv) = cx->blk_sub.savearray;                         \
@@ -665,9 +665,9 @@ struct block_format {
     } STMT_END
 
 
-/* subsets of POPSUB */
+/* subsets of CX_POPSUB */
 
-#define POPSUB_COMMON(cx) \
+#define CX_POPSUB_COMMON(cx) \
     STMT_START {                                                       \
         CV *cv;                                                         \
         PL_comppad = cx->blk_sub.prevcomppad;                           \
@@ -680,13 +680,13 @@ struct block_format {
 
 /* handle the @_ part of leaving a sub */
 
-#define POPSUB_ARGS(cx) \
+#define CX_POPSUB_ARGS(cx) \
     STMT_START {                                                       \
         AV *av;                                                         \
         assert(AvARRAY(MUTABLE_AV(                                      \
             PadlistARRAY(CvPADLIST(cx->blk_sub.cv))[                    \
                     CvDEPTH(cx->blk_sub.cv)])) == PL_curpad);           \
-        POP_SAVEARRAY(cx);                                             \
+        CX_POP_SAVEARRAY(cx);                                          \
         av = MUTABLE_AV(PAD_SVl(0));                                    \
         if (UNLIKELY(AvREAL(av)))                                      \
             /* abandon @_ if it got reified */                         \
@@ -696,7 +696,7 @@ struct block_format {
         }                                                              \
     } STMT_END
 
-#define POPSUB(cx)                                                     \
+#define CX_POPSUB(cx)                                                  \
     STMT_START {                                                       \
        RETURN_PROBE(CvNAMED(cx->blk_sub.cv)                            \
                        ? HEK_KEY(CvNAME_HEK(cx->blk_sub.cv))           \
@@ -706,12 +706,12 @@ struct block_format {
                CopSTASHPV((COP*)CvSTART((const CV*)cx->blk_sub.cv)));  \
                                                                        \
        if (CxHASARGS(cx)) {                                            \
-            POPSUB_ARGS(cx);                                            \
+            CX_POPSUB_ARGS(cx);                                         \
        }                                                               \
-        POPSUB_COMMON(cx);                                              \
+        CX_POPSUB_COMMON(cx);                                           \
     } STMT_END
 
-#define POPFORMAT(cx)                                                  \
+#define CX_POPFORMAT(cx)                                               \
     STMT_START {                                                       \
        CV *cv;                                                         \
        GV * const dfout = cx->blk_format.dfoutgv;                      \
@@ -757,7 +757,7 @@ struct block_eval {
        cx->blk_eval.cur_top_env = PL_top_env;                          \
     } STMT_END
 
-#define POPEVAL(cx)                                                    \
+#define CX_POPEVAL(cx)                                                 \
     STMT_START {                                                       \
         SV *sv;                                                         \
        PL_in_eval = CxOLD_IN_EVAL(cx);                                 \
@@ -768,7 +768,7 @@ struct block_eval {
            SvREFCNT_dec_NN(sv);                                        \
         }                                                               \
        sv = cx->blk_eval.old_namesv;                                   \
-       if (sv && !SvTEMP(sv))/* TEMP => POPEVAL re-entrantly called */ \
+       if (sv && !SvTEMP(sv))/* TEMP implies CX_POPEVAL re-entrantly called */ \
            sv_2mortal(sv);                                             \
     } STMT_END
 
@@ -834,7 +834,7 @@ struct block_loop {
         cx->blk_loop.itersave = isave;                                  \
         PUSHLOOP_FOR_setpad(cx);
 
-#define POPLOOP(cx)                                                    \
+#define CX_POPLOOP(cx)                                                 \
        if (  CxTYPE(cx) == CXt_LOOP_ARY                                \
            || CxTYPE(cx) == CXt_LOOP_LAZYSV)                            \
         {                                                              \
@@ -874,10 +874,10 @@ struct block_givwhen {
         PUSHWHEN(cx);                                                   \
         cx->blk_givwhen.defsv_save = orig_var;
 
-#define POPWHEN(cx)                                                     \
+#define CX_POPWHEN(cx)                                                  \
        NOOP;
 
-#define POPGIVEN(cx)                                                    \
+#define CX_POPGIVEN(cx)                                                 \
     STMT_START {                                                       \
         SV *sv = GvSV(PL_defgv);                                        \
         GvSV(PL_defgv) = cx->blk_givwhen.defsv_save;                    \
@@ -891,7 +891,7 @@ struct block_givwhen {
 #define PUSHBASICBLK(cx)                                                \
         cx->blk_oldsaveix = PL_savestack_ix;
 
-#define POPBASICBLK(cx)                                                 \
+#define CX_POPBASICBLK(cx)                                              \
        NOOP;
 
 
@@ -956,15 +956,15 @@ struct block {
         PL_tmps_floor           = PL_tmps_ix;                           \
        CX_DEBUG(cx, "PUSH");
 
-#define _POPBLOCK_COMMON(cx)                                           \
+#define _CX_POPBLOCK_COMMON(cx)                                                \
        PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp,            \
        PL_scopestack_ix = cx->blk_oldscopesp,                          \
        PL_curpm         = cx->blk_oldpm,
 
 /* Exit a block (RETURN and LAST). */
-#define POPBLOCK(cx)                                                   \
+#define CX_POPBLOCK(cx)                                                        \
        CX_DEBUG(cx, "POP");                                            \
-        _POPBLOCK_COMMON(cx)                                            \
+        _CX_POPBLOCK_COMMON(cx)                                         \
         /* LEAVE_SCOPE() should have made this true. /(?{})/ cheats
          * and leaves a CX entry lying around for repeated use, so
          * skip for multicall */                  \
@@ -974,12 +974,12 @@ struct block {
         PL_tmps_floor = cx->cx_u.cx_blk.blku_old_tmpsfloor;             \
 
 /* Continue a block elsewhere (e.g. NEXT, REDO, GOTO).
- * Whereas POPBLOCK restores the state to the point just before PUSHBLOCK
- * was called,  TOPBLOCK restores it to the point just *after* PUSHBLOCK
+ * Whereas CX_POPBLOCK restores the state to the point just before PUSHBLOCK
+ * was called,  CX_TOPBLOCK restores it to the point just *after* PUSHBLOCK
  * was called. */
-#define TOPBLOCK(cx)                                                   \
+#define CX_TOPBLOCK(cx)                                                        \
        CX_DEBUG(cx, "TOP");                                            \
-        _POPBLOCK_COMMON(cx)                                            \
+        _CX_POPBLOCK_COMMON(cx)                                         \
        PL_stack_sp      = PL_stack_base + cx->blk_oldsp;
 
 /* substitution context */
@@ -1033,7 +1033,7 @@ struct subst {
        (void)ReREFCNT_inc(rx);                                         \
         SvREFCNT_inc_void_NN(targ)
 
-#  define POPSUBST(cx) \
+#  define CX_POPSUBST(cx) \
     STMT_START {                                                       \
         REGEXP *re;                                                     \
        rxres_free(&cx->sb_rxres);                                      \
@@ -1300,7 +1300,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
 */
 
 #define dMULTICALL \
-    SV **newsp;                        /* set by POPBLOCK */                   \
+    SV **newsp;                        /* set by CX_POPBLOCK */                \
     PERL_CONTEXT *cx;                                                  \
     CV *multicall_cv;                                                  \
     OP *multicall_cop;                                                 \
@@ -1347,12 +1347,12 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
     STMT_START {                                                       \
        cx = CX_CUR();                                                  \
        CX_LEAVE_SCOPE(cx);                                             \
-        POPSUB_COMMON(cx);                                              \
+        CX_POPSUB_COMMON(cx);                                           \
         newsp = PL_stack_base + cx->blk_oldsp;                          \
         gimme = cx->blk_gimme;                                          \
         PERL_UNUSED_VAR(newsp); /* for API */                           \
         PERL_UNUSED_VAR(gimme); /* for API */                           \
-       POPBLOCK(cx);                                                   \
+       CX_POPBLOCK(cx);                                                \
        CX_POP(cx);                                                     \
        POPSTACK;                                                       \
        CATCH_SET(multicall_oldcatch);                                  \
@@ -1369,7 +1369,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
        PADLIST * const padlist = CvPADLIST(cv);                        \
        cx = CX_CUR();                                                  \
        assert(CxMULTICALL(cx));                                        \
-        POPSUB_COMMON(cx);                                              \
+        CX_POPSUB_COMMON(cx);                                           \
        cx->cx_type = (CXt_SUB|CXp_MULTICALL|flags);                    \
         PUSHSUB(cx);                                                   \
         if (!(flags & CXp_SUB_RE_FAKE))                                 \
index 8c44736..06ff223 100644 (file)
@@ -3727,7 +3727,7 @@ CODE:
     POPSTACK_TO(PL_mainstack);
     if (cxstack_ix >= 0) {
         dounwind(-1);
-        POPBLOCK(cxstack);
+        CX_POPBLOCK(cxstack);
     }
     LEAVE_SCOPE(0);
     PL_scopestack_ix = oldscope;
diff --git a/op.c b/op.c
index b5bc546..b924da5 100644 (file)
--- a/op.c
+++ b/op.c
@@ -7105,7 +7105,7 @@ Perl_newLOOPOP(pTHX_ I32 flags, I32 debuggable, OP *expr, OP *block)
 
     o->op_flags |= flags;
     o = op_scope(o);
-    o->op_flags |= OPf_SPECIAL;        /* suppress POPBLOCK curpm restoration*/
+    o->op_flags |= OPf_SPECIAL;        /* suppress CX_POPBLOCK curpm restoration*/
     return o;
 }
 
diff --git a/perl.c b/perl.c
index beb9d63..c86daa9 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -5082,7 +5082,7 @@ S_my_exit_jump(pTHX)
     POPSTACK_TO(PL_mainstack);
     if (cxstack_ix >= 0) {
         dounwind(-1);
-        POPBLOCK(cxstack);
+        CX_POPBLOCK(cxstack);
     }
     LEAVE_SCOPE(0);
 
diff --git a/pp.c b/pp.c
index f4a7dcd..c769f97 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -6444,7 +6444,7 @@ PP(pp_coreargs)
                PERL_CONTEXT *cx = CX_CUR();
 
                 assert(CxHASARGS(cx));
-                POPSUB_ARGS(cx);;
+                CX_POPSUB_ARGS(cx);;
                cx->cx_type &= ~CXp_HASARGS;
            }
          }
index 901eff8..8478918 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -287,7 +287,7 @@ PP(pp_substcont)
            TAINT_NOT;
 
            CX_LEAVE_SCOPE(cx);
-           POPSUBST(cx);
+           CX_POPSUBST(cx);
             CX_POP(cx);
 
            PERL_ASYNC_CHECK();
@@ -1508,7 +1508,7 @@ S_dopoptowhen(pTHX_ I32 startingblock)
 /* dounwind(): pop all contexts above (but not including) cxix.
  * Note that it clears the savestack frame associated with each popped
  * context entry, but doesn't free any temps.
- * It does a POPBLOCK of the last frame that it pops, and leaves
+ * It does a CX_POPBLOCK of the last frame that it pops, and leaves
  * cxstack_ix equal to cxix.
  */
 
@@ -1528,39 +1528,39 @@ Perl_dounwind(pTHX_ I32 cxix)
 
        switch (CxTYPE(cx)) {
        case CXt_SUBST:
-           POPSUBST(cx);
+           CX_POPSUBST(cx);
            break;
        case CXt_SUB:
-           POPSUB(cx);
+           CX_POPSUB(cx);
            break;
        case CXt_EVAL:
-           POPEVAL(cx);
+           CX_POPEVAL(cx);
            break;
        case CXt_BLOCK:
-            POPBASICBLK(cx);
+            CX_POPBASICBLK(cx);
            break;
        case CXt_LOOP_PLAIN:
        case CXt_LOOP_LAZYIV:
        case CXt_LOOP_LAZYSV:
        case CXt_LOOP_LIST:
        case CXt_LOOP_ARY:
-           POPLOOP(cx);
+           CX_POPLOOP(cx);
            break;
        case CXt_WHEN:
-           POPWHEN(cx);
+           CX_POPWHEN(cx);
            break;
        case CXt_GIVEN:
-           POPGIVEN(cx);
+           CX_POPGIVEN(cx);
            break;
        case CXt_NULL:
-            /* there isn't a POPNULL ! */
+            /* there isn't a CX_POPNULL ! */
            break;
        case CXt_FORMAT:
-           POPFORMAT(cx);
+           CX_POPFORMAT(cx);
            break;
        }
         if (cxstack_ix == cxix + 1) {
-            POPBLOCK(cx);
+            CX_POPBLOCK(cx);
         }
        cxstack_ix--;
     }
@@ -1694,8 +1694,8 @@ Perl_die_unwind(pTHX_ SV *msv)
            PL_stack_sp = oldsp;
 
             CX_LEAVE_SCOPE(cx);
-           POPEVAL(cx);
-           POPBLOCK(cx);
+           CX_POPEVAL(cx);
+           CX_POPBLOCK(cx);
            restartjmpenv = cx->blk_eval.cur_top_env;
            restartop = cx->blk_eval.retop;
             if (CxOLD_OP_TYPE(cx) == OP_REQUIRE)
@@ -2070,8 +2070,8 @@ PP(pp_leave)
                                 PL_op->op_private & OPpLVALUE ? 3 : 1);
 
     CX_LEAVE_SCOPE(cx);
-    POPBASICBLK(cx);
-    POPBLOCK(cx);
+    CX_POPBASICBLK(cx);
+    CX_POPBLOCK(cx);
     CX_POP(cx);
 
     return NORMAL;
@@ -2245,8 +2245,8 @@ PP(pp_leaveloop)
                                 PL_op->op_private & OPpLVALUE ? 3 : 1);
 
     CX_LEAVE_SCOPE(cx);
-    POPLOOP(cx);       /* Stack values are safe: release loop vars ... */
-    POPBLOCK(cx);
+    CX_POPLOOP(cx);    /* Stack values are safe: release loop vars ... */
+    CX_POPBLOCK(cx);
     CX_POP(cx);
 
     return NORMAL;
@@ -2352,8 +2352,8 @@ PP(pp_leavesublv)
     }
 
     CX_LEAVE_SCOPE(cx);
-    POPSUB(cx);        /* Stack values are safe: release CV and @_ ... */
-    POPBLOCK(cx);
+    CX_POPSUB(cx);     /* Stack values are safe: release CV and @_ ... */
+    CX_POPBLOCK(cx);
     retop =  cx->blk_sub.retop;
     CX_POP(cx);
 
@@ -2534,8 +2534,8 @@ PP(pp_last)
 
     /* Stack values are safe: */
     CX_LEAVE_SCOPE(cx);
-    POPLOOP(cx);       /* release loop vars ... */
-    POPBLOCK(cx);
+    CX_POPLOOP(cx);    /* release loop vars ... */
+    CX_POPBLOCK(cx);
     nextop = cx->blk_loop.my_op->op_lastop->op_next;
     CX_POP(cx);
 
@@ -2551,7 +2551,7 @@ PP(pp_next)
     if (!((PL_op->op_flags & OPf_SPECIAL) && CxTYPE_is_LOOP(cx)))
         cx = S_unwind_loop(aTHX);
 
-    TOPBLOCK(cx);
+    CX_TOPBLOCK(cx);
     PL_curcop = cx->blk_oldcop;
     PERL_ASYNC_CHECK();
     return (cx)->blk_loop.my_op->op_nextop;
@@ -2572,7 +2572,7 @@ PP(pp_redo)
 
     FREETMPS;
     CX_LEAVE_SCOPE(cx);
-    TOPBLOCK(cx);
+    CX_TOPBLOCK(cx);
     PL_curcop = cx->blk_oldcop;
     PERL_ASYNC_CHECK();
     return redo_op;
@@ -2717,7 +2717,7 @@ PP(pp_goto)
                dounwind(cxix);
             }
             cx = CX_CUR();
-           TOPBLOCK(cx);
+           CX_TOPBLOCK(cx);
            SPAGAIN;
 
             /* protect @_ during save stack unwind. */
@@ -2728,7 +2728,7 @@ PP(pp_goto)
             CX_LEAVE_SCOPE(cx);
 
            if (CxTYPE(cx) == CXt_SUB && CxHASARGS(cx)) {
-                /* this is part of POPSUB_ARGS() */
+                /* this is part of CX_POPSUB_ARGS() */
                AV* av = MUTABLE_AV(PAD_SVl(0));
                 assert(AvARRAY(MUTABLE_AV(
                     PadlistARRAY(CvPADLIST(cx->blk_sub.cv))[
@@ -2803,7 +2803,7 @@ PP(pp_goto)
                SP += items;
                if (CxTYPE(cx) == CXt_SUB && CxHASARGS(cx)) {
                    /* Restore old @_ */
-                    POP_SAVEARRAY(cx);
+                    CX_POP_SAVEARRAY(cx);
                }
 
                retop = cx->blk_sub.retop;
@@ -2811,8 +2811,8 @@ PP(pp_goto)
                 PL_curpad = LIKELY(PL_comppad) ? AvARRAY(PL_comppad) : NULL;
 
                /* XS subs don't have a CXt_SUB, so pop it;
-                 * this is a POPBLOCK(), less all the stuff we already did
-                 * for TOPBLOCK() earlier */
+                 * this is a CX_POPBLOCK(), less all the stuff we already did
+                 * for CX_TOPBLOCK() earlier */
                 PL_curcop = cx->blk_oldcop;
                 CX_POP(cx);
 
@@ -3000,7 +3000,7 @@ PP(pp_goto)
                DIE(aTHX_ "panic: docatch: illegal ix=%ld", (long)ix);
            dounwind(ix);
             cx = CX_CUR();
-           TOPBLOCK(cx);
+           CX_TOPBLOCK(cx);
        }
 
        /* push wanted frames */
@@ -3401,8 +3401,8 @@ S_doeval_compile(pTHX_ int gimme, CV* outside, U32 seq, HV *hh)
            SP = PL_stack_base + POPMARK;       /* pop original mark */
             cx = CX_CUR();
             CX_LEAVE_SCOPE(cx);
-           POPEVAL(cx);
-           POPBLOCK(cx);
+           CX_POPEVAL(cx);
+           CX_POPBLOCK(cx);
             if (in_require)
                 namesv = cx->blk_eval.old_namesv;
             CX_POP(cx);
@@ -4216,7 +4216,7 @@ PP(pp_leaveeval)
     OP *retop;
     SV *namesv = NULL;
     CV *evalcv;
-    /* grab this value before POPEVAL restores old PL_in_eval */
+    /* grab this value before CX_POPEVAL restores old PL_in_eval */
     bool keep = cBOOL(PL_in_eval & EVAL_KEEPERR);
 
     PERL_ASYNC_CHECK();
@@ -4240,7 +4240,7 @@ PP(pp_leaveeval)
     else
         leave_adjust_stacks(oldsp, oldsp, gimme, 0);
 
-    /* the POPEVAL does a leavescope, which frees the optree associated
+    /* the CX_POPEVAL does a leavescope, which frees the optree associated
      * with eval, which if it frees the nextstate associated with
      * PL_curcop, sets PL_curcop to NULL. Which can mess up freeing a
      * regex when running under 'use re Debug' because it needs PL_curcop
@@ -4249,8 +4249,8 @@ PP(pp_leaveeval)
     PL_curcop = cx->blk_oldcop;
 
     CX_LEAVE_SCOPE(cx);
-    POPEVAL(cx);
-    POPBLOCK(cx);
+    CX_POPEVAL(cx);
+    CX_POPBLOCK(cx);
     retop = cx->blk_eval.retop;
     evalcv = cx->blk_eval.cv;
     CX_POP(cx);
@@ -4281,8 +4281,8 @@ Perl_delete_eval_scope(pTHX)
        
     cx = CX_CUR();
     CX_LEAVE_SCOPE(cx);
-    POPEVAL(cx);
-    POPBLOCK(cx);
+    CX_POPEVAL(cx);
+    CX_POPBLOCK(cx);
     CX_POP(cx);
 }
 
@@ -4335,8 +4335,8 @@ PP(pp_leavetry)
     else
         leave_adjust_stacks(oldsp, oldsp, gimme, 1);
     CX_LEAVE_SCOPE(cx);
-    POPEVAL(cx);
-    POPBLOCK(cx);
+    CX_POPEVAL(cx);
+    CX_POPBLOCK(cx);
     retop = cx->blk_eval.retop;
     CX_POP(cx);
 
@@ -4379,8 +4379,8 @@ PP(pp_leavegiven)
         leave_adjust_stacks(oldsp, oldsp, gimme, 1);
 
     CX_LEAVE_SCOPE(cx);
-    POPGIVEN(cx);
-    POPBLOCK(cx);
+    CX_POPGIVEN(cx);
+    CX_POPBLOCK(cx);
     CX_POP(cx);
 
     return NORMAL;
@@ -4974,7 +4974,7 @@ PP(pp_leavewhen)
         /* emulate pp_next. Note that any stack(s) cleanup will be
          * done by the pp_unstack which op_nextop should point to */
         cx = CX_CUR();
-       TOPBLOCK(cx);
+       CX_TOPBLOCK(cx);
        PL_curcop = cx->blk_oldcop;
        return cx->blk_loop.my_op->op_nextop;
     }
@@ -5002,8 +5002,8 @@ PP(pp_continue)
     assert(CxTYPE(cx) == CXt_WHEN);
     PL_stack_sp = PL_stack_base + cx->blk_oldsp;
     CX_LEAVE_SCOPE(cx);
-    POPWHEN(cx);
-    POPBLOCK(cx);
+    CX_POPWHEN(cx);
+    CX_POPBLOCK(cx);
     nextop = cx->blk_givwhen.leave_op->op_next;
     CX_POP(cx);
 
index 8b8a0ad..824e7e7 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -3639,8 +3639,8 @@ PP(pp_leavesub)
         leave_adjust_stacks(oldsp, oldsp, gimme, 0);
 
     CX_LEAVE_SCOPE(cx);
-    POPSUB(cx);        /* Stack values are safe: release CV and @_ ... */
-    POPBLOCK(cx);
+    CX_POPSUB(cx);     /* Stack values are safe: release CV and @_ ... */
+    CX_POPBLOCK(cx);
     retop = cx->blk_sub.retop;
     CX_POP(cx);
 
@@ -3875,7 +3875,7 @@ PP(pp_entersub)
 
             /* it's the responsibility of whoever leaves a sub to ensure
              * that a clean, empty AV is left in pad[0]. This is normally
-             * done by POPSUB() */
+             * done by CX_POPSUB() */
             assert(!AvREAL(av) && AvFILLp(av) == -1);
 
             items = SP - MARK;
index 4079eef..8e87512 100644 (file)
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1706,13 +1706,13 @@ PP(pp_sort)
             CX_LEAVE_SCOPE(cx);
            if (!(flags & OPf_SPECIAL)) {
                 assert(CxTYPE(cx) == CXt_SUB);
-                POPSUB(cx);
+                CX_POPSUB(cx);
            }
             else
                 assert(CxTYPE(cx) == CXt_NULL);
                 /* there isn't a POPNULL ! */
 
-           POPBLOCK(cx);
+           CX_POPBLOCK(cx);
             CX_POP(cx);
            POPSTACK;
            CATCH_SET(oldcatch);
index ff56179..ea99011 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1527,8 +1527,8 @@ PP(pp_leavewrite)
     assert(CxTYPE(cx) == CXt_FORMAT);
     SP = PL_stack_base + cx->blk_oldsp; /* ignore retval of formline */
     CX_LEAVE_SCOPE(cx);
-    POPFORMAT(cx);
-    POPBLOCK(cx);
+    CX_POPFORMAT(cx);
+    CX_POPBLOCK(cx);
     retop = cx->blk_sub.retop;
     CX_POP(cx);
 
diff --git a/scope.c b/scope.c
index 342e514..f425be5 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -1233,9 +1233,11 @@ Perl_leave_scope(pTHX_ I32 base)
                SV **svp;
                assert (ARG1_PTR);
                svp = AvARRAY((PAD*)ARG1_PTR) + (PADOFFSET)arg0.any_uv;
-               /* This mortalizing used to be done by POPLOOP() via itersave.
-                  But as we have all the information here, we can do it here,
-                  save even having to have itersave in the struct.  */
+                /* This mortalizing used to be done by CX_POOPLOOP() via
+                   itersave.  But as we have all the information here, we
+                   can do it here, save even having to have itersave in
+                   the struct.
+                   */
                sv_2mortal(*svp);
                *svp = ARG2_SV;
            }
index bfa015e..2349b84 100644 (file)
@@ -42,7 +42,7 @@ sub new4 { goto &new2 }
     is("@$y","a b c y", 'goto: multiple elements');
 }
 
-# see if POPSUB gets to see the right pad across a dounwind() with
+# see if CX_POPSUB gets to see the right pad across a dounwind() with
 # a reified @_
 
 sub methimpl {
@@ -63,7 +63,7 @@ sub try {
 
 for (1..5) { try() }
 is($failcount, 5,
-    'POPSUB sees right pad across a dounwind() with reified @_');
+    'CX_POPSUB sees right pad across a dounwind() with reified @_');
 
 # bug #21542 local $_[0] causes reify problems and coredumps