For compiler's CC, make PP_EVAL, PP_ENTERTRY work with JMPENV.
Malcolm Beattie [Tue, 2 Sep 1997 11:54:55 +0000 (11:54 +0000)]
p4raw-id: //depot/perlext/Compiler@47

cc_runtime.h

index 475af3b..5d2e640 100644 (file)
 #define RUN() runops()
 #endif
 
+#if PATCHLEVEL > 3
+/* Anyone using eval "" deserves this mess */
+#define PP_EVAL(ppaddr, nxt) do {              \
+       dJMPENV;                                \
+       int ret;                                \
+       PUTBACK;                                \
+       JMPENV_PUSH(ret);                       \
+       switch (ret) {                          \
+       case 0:                                 \
+           op = ppaddr();                      \
+           retstack[retstack_ix - 1] = Nullop; \
+           if (op != nxt) RUN();               \
+           JMPENV_POP;                         \
+           break;                              \
+       case 1: JMPENV_POP; JMPENV_JUMP(1);     \
+       case 2: JMPENV_POP; JMPENV_JUMP(2);     \
+       case 3:                                 \
+           JMPENV_POP;                         \
+           if (restartop != nxt)               \
+               JMPENV_JUMP(3);                 \
+       }                                       \
+       op = nxt;                               \
+       SPAGAIN;                                \
+    } while (0)
+
+#define PP_ENTERTRY(jmpbuf,label) do {         \
+       dJMPENV;                                \
+       int ret;                                \
+       JMPENV_PUSH(ret);                       \
+       switch (ret) {                          \
+       case 1: JMPENV_POP; JMPENV_JUMP(1);     \
+       case 2: JMPENV_POP; JMPENV_JUMP(2);     \
+       case 3: JMPENV_POP; SPAGAIN; goto label;\
+       }                                       \
+    } while (0)
+#else
 /* Anyone using eval "" deserves this mess */
 #define PP_EVAL(ppaddr, nxt) do {              \
        Sigjmp_buf oldtop;                      \
        case 3: Copy(jmpbuf,top_env,1,Sigjmp_buf); SPAGAIN; goto label; \
        }                                       \
     } while (0)
+#endif