summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-06-02 11:51:44 +0100
committerDavid Mitchell <davem@iabyn.com>2015-06-19 08:44:17 +0100
commite1a10f35503e6758601f1a5c97682620c4644bc8 (patch)
treed22ca05f94079c48fd1a5d11eb3189d0b69e96f5
parenta8fc6464d21b7e1fc056ca7bd504ada3f88770d7 (diff)
downloadperl-e1a10f35503e6758601f1a5c97682620c4644bc8.tar.gz
add PERLSI_MULTICALL
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.
-rw-r--r--cop.h3
-rw-r--r--deb.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/cop.h b/cop.h
index 8a96331de3..bf287a1672 100644
--- 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 aacd8bfdfd..4ae101d0fc 100644
--- a/deb.c
+++ b/deb.c
@@ -192,6 +192,7 @@ static const char * const si_names[] = {
"WARNHOOK",
"DIEHOOK",
"REQUIRE"
+ "MULTICALL"
};
#endif