ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/staticperl/perl/cc_runtime.h
Revision: 1.1
Committed: Thu Jun 30 14:26:41 2005 UTC (21 years, 3 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: PERL-5-8-7, HEAD
Branch point for: PERL
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 /* cc_runtime.h
2     *
3     * Copyright (C) 1999, 2000, 2001, by Larry Wall and others
4     *
5     * You may distribute under the terms of either the GNU General Public
6     * License or the Artistic License, as specified in the README file.
7     *
8     */
9    
10     #define DOOP(ppname) PUTBACK; PL_op = ppname(aTHX); SPAGAIN
11     #define CCPP(s) OP * s(pTHX)
12    
13     #define PP_LIST(g) do { \
14     dMARK; \
15     if (g != G_ARRAY) { \
16     if (++MARK <= SP) \
17     *MARK = *SP; \
18     else \
19     *MARK = &PL_sv_undef; \
20     SP = MARK; \
21     } \
22     } while (0)
23    
24     #define MAYBE_TAINT_SASSIGN_SRC(sv) \
25     if (PL_tainting && PL_tainted && (!SvGMAGICAL(left) || !SvSMAGICAL(left) || \
26     !((mg=mg_find(left, PERL_MAGIC_taint)) && mg->mg_len & 1)))\
27     TAINT_NOT
28    
29     #define PP_PREINC(sv) do { \
30     if (SvIOK(sv)) { \
31     ++SvIVX(sv); \
32     SvFLAGS(sv) &= ~(SVf_NOK|SVf_POK|SVp_NOK|SVp_POK); \
33     } \
34     else \
35     sv_inc(sv); \
36     SvSETMAGIC(sv); \
37     } while (0)
38    
39     #define PP_UNSTACK do { \
40     TAINT_NOT; \
41     PL_stack_sp = PL_stack_base + cxstack[cxstack_ix].blk_oldsp; \
42     FREETMPS; \
43     oldsave = PL_scopestack[PL_scopestack_ix - 1]; \
44     LEAVE_SCOPE(oldsave); \
45     SPAGAIN; \
46     } while(0)
47    
48     /* Anyone using eval "" deserves this mess */
49     #define PP_EVAL(ppaddr, nxt) do { \
50     dJMPENV; \
51     int ret; \
52     PUTBACK; \
53     JMPENV_PUSH(ret); \
54     switch (ret) { \
55     case 0: \
56     PL_op = ppaddr(aTHX); \
57     PL_retstack[PL_retstack_ix - 1] = Nullop; \
58     if (PL_op != nxt) CALLRUNOPS(); \
59     JMPENV_POP; \
60     break; \
61     case 1: JMPENV_POP; JMPENV_JUMP(1); \
62     case 2: JMPENV_POP; JMPENV_JUMP(2); \
63     case 3: \
64     JMPENV_POP; \
65     if (PL_restartop && PL_restartop != nxt) \
66     JMPENV_JUMP(3); \
67     } \
68     PL_op = nxt; \
69     SPAGAIN; \
70     } while (0)
71    
72    
73     #define PP_ENTERTRY(jmpbuf,label) \
74     STMT_START { \
75     int ret; \
76     JMPENV_PUSH_ENV(jmpbuf,ret); \
77     switch (ret) { \
78     case 1: JMPENV_POP_ENV(jmpbuf); JMPENV_JUMP(1);\
79     case 2: JMPENV_POP_ENV(jmpbuf); JMPENV_JUMP(2);\
80     case 3: JMPENV_POP_ENV(jmpbuf); SPAGAIN; goto label;\
81     } \
82     } STMT_END
83     #define PP_LEAVETRY \
84     STMT_START{ PL_top_env=PL_top_env->je_prev; }STMT_END