summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorJoshua Pritikin <joshua.pritikin@db.com>1998-06-26 05:34:34 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-06-28 21:35:02 +0000
commitd3acc0f7e51973106c8c51ff053cffc8bd402843 (patch)
tree00f1e3a5300571443c61a4ea0113c741c33431ca /cop.h
parentea7c11a37de2088ba174a077e567a01d0e73d0ca (diff)
downloadperl-d3acc0f7e51973106c8c51ff053cffc8bd402843.tar.gz
PUSHSTACK renovation
Message-Id: <H00000e500081d23@MHS> p4raw-id: //depot/perl@1254
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/cop.h b/cop.h
index 4e14c88172..478bfd432e 100644
--- a/cop.h
+++ b/cop.h
@@ -292,6 +292,7 @@ struct context {
* This ensures magic doesn't invalidate local stack and cx pointers.
*/
+#define SI_UNKNOWN -1
#define SI_UNDEF 0
#define SI_MAIN 1
#define SI_MAGIC 2
@@ -301,6 +302,7 @@ struct context {
#define SI_DESTROY 6
#define SI_WARNHOOK 7
#define SI_DIEHOOK 8
+#define SI_REQUIRE 9
struct stackinfo {
AV * si_stack; /* stack for current runlevel */
@@ -327,7 +329,7 @@ typedef struct stackinfo PERL_SI;
# define SET_MARKBASE NOOP
#endif
-#define PUSHSTACK(type) \
+#define PUSHSTACKi(type) \
STMT_START { \
PERL_SI *next = curstackinfo->si_next; \
if (!next) { \
@@ -343,7 +345,9 @@ typedef struct stackinfo PERL_SI;
SET_MARKBASE; \
} STMT_END
-#define POPSTACK() \
+#define PUSHSTACK PUSHSTACKi(SI_UNKNOWN)
+
+#define POPSTACK \
STMT_START { \
PERL_SI *prev = curstackinfo->si_prev; \
if (!prev) { \
@@ -359,6 +363,6 @@ typedef struct stackinfo PERL_SI;
STMT_START { \
while (curstack != s) { \
dounwind(-1); \
- POPSTACK(); \
+ POPSTACK; \
} \
} STMT_END