add PERLSI_MULTICALL
authorDavid Mitchell <davem@iabyn.com>
Tue, 2 Jun 2015 10:51:44 +0000 (11:51 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 19 Jun 2015 07:44:17 +0000 (08:44 +0100)
Currently when MULTICALL pushes a new stackinfo, it uses the si_type
PERLSI_SORT. This is probably just a hangover from when the MULTICALL code
was created from similar code used to implement sort.

Change it to use the new PERLSI_MULTICALL si_type.

The si_type value is mainly used for debugging/dumping purposes,
apart from a few places where we check for whether this is
the top stack (PERLSI_MAIN); or check for a sort BLOCK (cxix = 0,
CXt_NULL, PERLSI_SORT).

So this commit should have no immediate effect. It will in future
however allow us to detect whether we have a sort or a true MULTICALL.

cop.h
deb.c

diff --git a/cop.h b/cop.h
index 8a96331..bf287a1 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -1092,6 +1092,7 @@ L<perlcall>.
 #define PERLSI_WARNHOOK                7
 #define PERLSI_DIEHOOK         8
 #define PERLSI_REQUIRE         9
+#define PERLSI_MULTICALL       10
 
 struct stackinfo {
     AV *               si_stack;       /* stack for current runlevel */
@@ -1215,7 +1216,7 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
        multicall_oldcatch = CATCH_GET;                                 \
        SAVETMPS; SAVEVPTR(PL_op);                                      \
        CATCH_SET(TRUE);                                                \
-       PUSHSTACKi(PERLSI_SORT);                                        \
+       PUSHSTACKi(PERLSI_MULTICALL);                                   \
        PUSHBLOCK(cx, (CXt_SUB|CXp_MULTICALL|flags), PL_stack_sp);      \
        PUSHSUB(cx);                                                    \
         if (!(flags & CXp_SUB_RE_FAKE))                                 \
diff --git a/deb.c b/deb.c
index aacd8bf..4ae101d 100644 (file)
--- a/deb.c
+++ b/deb.c
@@ -192,6 +192,7 @@ static const char * const si_names[] = {
     "WARNHOOK",
     "DIEHOOK",
     "REQUIRE"
+    "MULTICALL"
 };
 #endif