diff options
author | Vishal Bhatia <vishal@deja.com> | 1999-03-02 15:27:25 -0800 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-03-04 05:20:50 +0000 |
commit | a6f4eb0a57a2e0009d1bf64dff4f70a26302e92d (patch) | |
tree | 1a3c8f560b38b01203e3a748a21a26d113e93286 /cc_runtime.h | |
parent | 4d0c1c44b6764966a3c975cf76bf3a3a7e41f6bd (diff) | |
download | perl-a6f4eb0a57a2e0009d1bf64dff4f70a26302e92d.tar.gz |
updates to compiler modules
Message-ID: <19990303072725.779.qmail@hotmail.com>
Subject: PATCH 5.005_56 + Test procedure
p4raw-id: //depot/perl@3066
Diffstat (limited to 'cc_runtime.h')
-rw-r--r-- | cc_runtime.h | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/cc_runtime.h b/cc_runtime.h index 9a01ff8335..5b6d2c7287 100644 --- a/cc_runtime.h +++ b/cc_runtime.h @@ -59,13 +59,39 @@ SPAGAIN; \ } while (0) -#define PP_ENTERTRY(jmpbuf,label) do { \ - dJMPENV; \ +#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; \ - JMPENV_PUSH(ret); \ + B_JMPENV_PUSH(jmpbuf,ret); \ switch (ret) { \ - case 1: JMPENV_POP; JMPENV_JUMP(1); \ - case 2: JMPENV_POP; JMPENV_JUMP(2); \ - case 3: JMPENV_POP; SPAGAIN; goto label;\ - } \ + 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 |