Re: [PATCH 5.004_60] Fix goto-in-eval segfault (unwrapped!)
[p5sagit/p5-mst-13.2.git] / byterun.h
1 /*
2  *      Copyright (c) 1996, 1997 Malcolm Beattie
3  *
4  *      You may distribute under the terms of either the GNU General Public
5  *      License or the Artistic License, as specified in the README file.
6  *
7  */
8 /*
9  * This file is autogenerated from bytecode.pl. Changes made here will be lost.
10  */
11 #ifdef INDIRECT_BGET_MACROS
12 struct bytestream {
13     void *data;
14     int (*fgetc)(void *);
15     int (*fread)(char *, size_t, size_t, void*);
16     void (*freadpv)(U32, void*);
17 };
18 void freadpv _((U32, void *));
19 void byterun _((struct bytestream));
20 #else
21 void byterun _((FILE *));
22 #endif /* INDIRECT_BGET_MACROS */
23
24 #ifndef PATCHLEVEL
25 #include "patchlevel.h"
26 #endif
27 #if PATCHLEVEL < 4 || (PATCHLEVEL == 4 && SUBVERSION < 50)
28 #define dTHR extern int errno
29 #endif
30
31 enum {
32     INSN_RET,                   /* 0 */
33     INSN_LDSV,                  /* 1 */
34     INSN_LDOP,                  /* 2 */
35     INSN_STSV,                  /* 3 */
36     INSN_STOP,                  /* 4 */
37     INSN_LDSPECSV,                      /* 5 */
38     INSN_NEWSV,                 /* 6 */
39     INSN_NEWOP,                 /* 7 */
40     INSN_NEWOPN,                        /* 8 */
41     INSN_NEWPV,                 /* 9 */
42     INSN_NOP,                   /* 10 */
43     INSN_PV_CUR,                        /* 11 */
44     INSN_PV_FREE,                       /* 12 */
45     INSN_SV_UPGRADE,                    /* 13 */
46     INSN_SV_REFCNT,                     /* 14 */
47     INSN_SV_REFCNT_ADD,                 /* 15 */
48     INSN_SV_FLAGS,                      /* 16 */
49     INSN_XRV,                   /* 17 */
50     INSN_XPV,                   /* 18 */
51     INSN_XIV32,                 /* 19 */
52     INSN_XIV64,                 /* 20 */
53     INSN_XNV,                   /* 21 */
54     INSN_XLV_TARGOFF,                   /* 22 */
55     INSN_XLV_TARGLEN,                   /* 23 */
56     INSN_XLV_TARG,                      /* 24 */
57     INSN_XLV_TYPE,                      /* 25 */
58     INSN_XBM_USEFUL,                    /* 26 */
59     INSN_XBM_PREVIOUS,                  /* 27 */
60     INSN_XBM_RARE,                      /* 28 */
61     INSN_XFM_LINES,                     /* 29 */
62     INSN_XIO_LINES,                     /* 30 */
63     INSN_XIO_PAGE,                      /* 31 */
64     INSN_XIO_PAGE_LEN,                  /* 32 */
65     INSN_XIO_LINES_LEFT,                        /* 33 */
66     INSN_XIO_TOP_NAME,                  /* 34 */
67     INSN_COMMENT,                       /* 35 */
68     INSN_XIO_TOP_GV,                    /* 36 */
69     INSN_XIO_FMT_NAME,                  /* 37 */
70     INSN_XIO_FMT_GV,                    /* 38 */
71     INSN_XIO_BOTTOM_NAME,                       /* 39 */
72     INSN_XIO_BOTTOM_GV,                 /* 40 */
73     INSN_XIO_SUBPROCESS,                        /* 41 */
74     INSN_XIO_TYPE,                      /* 42 */
75     INSN_XIO_FLAGS,                     /* 43 */
76     INSN_XCV_STASH,                     /* 44 */
77     INSN_XCV_START,                     /* 45 */
78     INSN_XCV_ROOT,                      /* 46 */
79     INSN_XCV_GV,                        /* 47 */
80     INSN_XCV_FILEGV,                    /* 48 */
81     INSN_XCV_DEPTH,                     /* 49 */
82     INSN_XCV_PADLIST,                   /* 50 */
83     INSN_XCV_OUTSIDE,                   /* 51 */
84     INSN_XCV_FLAGS,                     /* 52 */
85     INSN_AV_EXTEND,                     /* 53 */
86     INSN_AV_PUSH,                       /* 54 */
87     INSN_XAV_FILL,                      /* 55 */
88     INSN_XAV_MAX,                       /* 56 */
89     INSN_XAV_FLAGS,                     /* 57 */
90     INSN_XHV_RITER,                     /* 58 */
91     INSN_XHV_NAME,                      /* 59 */
92     INSN_HV_STORE,                      /* 60 */
93     INSN_SV_MAGIC,                      /* 61 */
94     INSN_MG_OBJ,                        /* 62 */
95     INSN_MG_PRIVATE,                    /* 63 */
96     INSN_MG_FLAGS,                      /* 64 */
97     INSN_MG_PV,                 /* 65 */
98     INSN_XMG_STASH,                     /* 66 */
99     INSN_GV_FETCHPV,                    /* 67 */
100     INSN_GV_STASHPV,                    /* 68 */
101     INSN_GP_SV,                 /* 69 */
102     INSN_GP_REFCNT,                     /* 70 */
103     INSN_GP_REFCNT_ADD,                 /* 71 */
104     INSN_GP_AV,                 /* 72 */
105     INSN_GP_HV,                 /* 73 */
106     INSN_GP_CV,                 /* 74 */
107     INSN_GP_FILEGV,                     /* 75 */
108     INSN_GP_IO,                 /* 76 */
109     INSN_GP_FORM,                       /* 77 */
110     INSN_GP_CVGEN,                      /* 78 */
111     INSN_GP_LINE,                       /* 79 */
112     INSN_GP_SHARE,                      /* 80 */
113     INSN_XGV_FLAGS,                     /* 81 */
114     INSN_OP_NEXT,                       /* 82 */
115     INSN_OP_SIBLING,                    /* 83 */
116     INSN_OP_PPADDR,                     /* 84 */
117     INSN_OP_TARG,                       /* 85 */
118     INSN_OP_TYPE,                       /* 86 */
119     INSN_OP_SEQ,                        /* 87 */
120     INSN_OP_FLAGS,                      /* 88 */
121     INSN_OP_PRIVATE,                    /* 89 */
122     INSN_OP_FIRST,                      /* 90 */
123     INSN_OP_LAST,                       /* 91 */
124     INSN_OP_OTHER,                      /* 92 */
125     INSN_OP_TRUE,                       /* 93 */
126     INSN_OP_FALSE,                      /* 94 */
127     INSN_OP_CHILDREN,                   /* 95 */
128     INSN_OP_PMREPLROOT,                 /* 96 */
129     INSN_OP_PMREPLROOTGV,                       /* 97 */
130     INSN_OP_PMREPLSTART,                        /* 98 */
131     INSN_OP_PMNEXT,                     /* 99 */
132     INSN_PREGCOMP,                      /* 100 */
133     INSN_OP_PMFLAGS,                    /* 101 */
134     INSN_OP_PMPERMFLAGS,                        /* 102 */
135     INSN_OP_SV,                 /* 103 */
136     INSN_OP_GV,                 /* 104 */
137     INSN_OP_PV,                 /* 105 */
138     INSN_OP_PV_TR,                      /* 106 */
139     INSN_OP_REDOOP,                     /* 107 */
140     INSN_OP_NEXTOP,                     /* 108 */
141     INSN_OP_LASTOP,                     /* 109 */
142     INSN_COP_LABEL,                     /* 110 */
143     INSN_COP_STASH,                     /* 111 */
144     INSN_COP_FILEGV,                    /* 112 */
145     INSN_COP_SEQ,                       /* 113 */
146     INSN_COP_ARYBASE,                   /* 114 */
147     INSN_COP_LINE,                      /* 115 */
148     INSN_MAIN_START,                    /* 116 */
149     INSN_MAIN_ROOT,                     /* 117 */
150     INSN_CURPAD,                        /* 118 */
151     MAX_INSN = 118
152 };
153
154 enum {
155     OPt_OP,             /* 0 */
156     OPt_UNOP,           /* 1 */
157     OPt_BINOP,          /* 2 */
158     OPt_LOGOP,          /* 3 */
159     OPt_CONDOP,         /* 4 */
160     OPt_LISTOP,         /* 5 */
161     OPt_PMOP,           /* 6 */
162     OPt_SVOP,           /* 7 */
163     OPt_GVOP,           /* 8 */
164     OPt_PVOP,           /* 9 */
165     OPt_LOOP,           /* 10 */
166     OPt_COP             /* 11 */
167 };
168
169 EXT int optype_size[]
170 #ifdef DOINIT
171 = {
172     sizeof(OP),
173     sizeof(UNOP),
174     sizeof(BINOP),
175     sizeof(LOGOP),
176     sizeof(CONDOP),
177     sizeof(LISTOP),
178     sizeof(PMOP),
179     sizeof(SVOP),
180     sizeof(GVOP),
181     sizeof(PVOP),
182     sizeof(LOOP),
183     sizeof(COP)
184 }
185 #endif /* DOINIT */
186 ;
187
188 EXT SV * specialsv_list[4];
189 #define INIT_SPECIALSV_LIST STMT_START { \
190 specialsv_list[0] = Nullsv; \
191 specialsv_list[1] = &sv_undef; \
192 specialsv_list[2] = &sv_yes; \
193 specialsv_list[3] = &sv_no; \
194 } STMT_END