summaryrefslogtreecommitdiff
path: root/cc_runtime.h
diff options
context:
space:
mode:
authorVishal Bhatia <vishal@deja.com>1999-05-27 00:56:54 -0700
committerJarkko Hietaniemi <jhi@iki.fi>1999-05-28 07:51:17 +0000
commit1d651c14520f7db44adb51b335f0fd87f91e8421 (patch)
treebfdc6d63954326b42dd4817e9fea303b8ea32b5a /cc_runtime.h
parentbd628c730307c17b2204ca361fbabbea581d4082 (diff)
downloadperl-1d651c14520f7db44adb51b335f0fd87f91e8421.tar.gz
fixing eval in the compiler
To: perl5-porters@perl.org Message-ID: <JDIKFDKKLGHHBAAA@my-deja.com> p4raw-id: //depot/cfgperl@3491
Diffstat (limited to 'cc_runtime.h')
-rw-r--r--cc_runtime.h47
1 files changed, 12 insertions, 35 deletions
diff --git a/cc_runtime.h b/cc_runtime.h
index 5b6d2c7287..bb9b7dc5d9 100644
--- a/cc_runtime.h
+++ b/cc_runtime.h
@@ -59,39 +59,16 @@
SPAGAIN; \
} while (0)
-#define B_JMPENV_PUSH(cur_env,v) \
- STMT_START { \
- cur_env.je_prev = PL_top_env; \
- OP_REG_TO_MEM; \
- cur_env.je_ret = PerlProc_setjmp(cur_env.je_buf, 1); \
- OP_MEM_TO_REG; \
- PL_top_env = &cur_env; \
- cur_env.je_mustcatch = FALSE; \
- (v) = cur_env.je_ret; \
- } STMT_END
-#define B_JMPENV_POP(cur_env) \
- STMT_START { PL_top_env = cur_env.je_prev; } STMT_END
-#define B_JMPENV_JUMP(cur_env,v) \
- STMT_START { \
- OP_REG_TO_MEM; \
- if (PL_top_env->je_prev) \
- PerlProc_longjmp(PL_top_env->je_buf, (v)); \
- if ((v) == 2) \
- PerlProc_exit(STATUS_NATIVE_EXPORT); \
- PerlIO_printf(PerlIO_stderr(), "panic: top_env\n"); \
- PerlProc_exit(1); \
- } STMT_END
-
-
-#define PP_ENTERTRY(jmpbuf,label) { \
- int ret; \
- B_JMPENV_PUSH(jmpbuf,ret); \
- switch (ret) { \
- case 1: B_JMPENV_POP(jmpbuf); B_JMPENV_JUMP(jmpbuf,1); \
- case 2: B_JMPENV_POP(jmpbuf); B_JMPENV_JUMP(jmpbuf,2); \
- case 3: B_JMPENV_POP(jmpbuf); SPAGAIN; goto label;\
- } \
- } while (0)
-
-#define PP_LEAVETRY PL_top_env=PL_top_env->je_prev
+#define PP_ENTERTRY(jmpbuf,label) \
+ STMT_START { \
+ int ret; \
+ JMPENV_PUSH_ENV(jmpbuf,ret); \
+ switch (ret) { \
+ case 1: JMPENV_POP_ENV(jmpbuf); JMPENV_JUMP(1);\
+ case 2: JMPENV_POP_ENV(jmpbuf); JMPENV_JUMP(2);\
+ case 3: JMPENV_POP_ENV(jmpbuf); SPAGAIN; goto label;\
+ } \
+ } STMT_END
+#define PP_LEAVETRY \
+ STMT_START{ PL_top_env=PL_top_env->je_prev; }STMT_END