This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Initial check-in of perl compiler.
[perl5.git] / byterun.h
1 /*
2  *      Copyright (c) 1996 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 enum {
25     INSN_RET,                   /* 0 */
26     INSN_LDSV,                  /* 1 */
27     INSN_LDOP,                  /* 2 */
28     INSN_STSV,                  /* 3 */
29     INSN_STOP,                  /* 4 */
30     INSN_LDSPECSV,                      /* 5 */
31     INSN_NEWSV,                 /* 6 */
32     INSN_NEWOP,                 /* 7 */
33     INSN_NEWOPN,                        /* 8 */
34     INSN_NEWPV,                 /* 9 */
35     INSN_NOP,                   /* 10 */
36     INSN_PV_CUR,                        /* 11 */
37     INSN_PV_FREE,                       /* 12 */
38     INSN_SV_UPGRADE,                    /* 13 */
39     INSN_SV_REFCNT,                     /* 14 */
40     INSN_SV_REFCNT_ADD,                 /* 15 */
41     INSN_SV_FLAGS,                      /* 16 */
42     INSN_XRV,                   /* 17 */
43     INSN_XPV,                   /* 18 */
44     INSN_XIV32,                 /* 19 */
45     INSN_XIV64,                 /* 20 */
46     INSN_XNV,                   /* 21 */
47     INSN_XLV_TARGOFF,                   /* 22 */
48     INSN_XLV_TARGLEN,                   /* 23 */
49     INSN_XLV_TARG,                      /* 24 */
50     INSN_XLV_TYPE,                      /* 25 */
51     INSN_XBM_USEFUL,                    /* 26 */
52     INSN_XBM_PREVIOUS,                  /* 27 */
53     INSN_XBM_RARE,                      /* 28 */
54     INSN_XFM_LINES,                     /* 29 */
55     INSN_XIO_LINES,                     /* 30 */
56     INSN_XIO_PAGE,                      /* 31 */
57     INSN_XIO_PAGE_LEN,                  /* 32 */
58     INSN_XIO_LINES_LEFT,                        /* 33 */
59     INSN_XIO_TOP_NAME,                  /* 34 */
60     INSN_COMMENT,                       /* 35 */
61     INSN_XIO_TOP_GV,                    /* 36 */
62     INSN_XIO_FMT_NAME,                  /* 37 */
63     INSN_XIO_FMT_GV,                    /* 38 */
64     INSN_XIO_BOTTOM_NAME,                       /* 39 */
65     INSN_XIO_BOTTOM_GV,                 /* 40 */
66     INSN_XIO_SUBPROCESS,                        /* 41 */
67     INSN_XIO_TYPE,                      /* 42 */
68     INSN_XIO_FLAGS,                     /* 43 */
69     INSN_XCV_STASH,                     /* 44 */
70     INSN_XCV_START,                     /* 45 */
71     INSN_XCV_ROOT,                      /* 46 */
72     INSN_XCV_GV,                        /* 47 */
73     INSN_XCV_FILEGV,                    /* 48 */
74     INSN_XCV_DEPTH,                     /* 49 */
75     INSN_XCV_PADLIST,                   /* 50 */
76     INSN_XCV_OUTSIDE,                   /* 51 */
77     INSN_XCV_FLAGS,                     /* 52 */
78     INSN_AV_EXTEND,                     /* 53 */
79     INSN_AV_PUSH,                       /* 54 */
80     INSN_XAV_FILL,                      /* 55 */
81     INSN_XAV_MAX,                       /* 56 */
82     INSN_XAV_FLAGS,                     /* 57 */
83     INSN_XHV_RITER,                     /* 58 */
84     INSN_XHV_NAME,                      /* 59 */
85     INSN_HV_STORE,                      /* 60 */
86     INSN_SV_MAGIC,                      /* 61 */
87     INSN_MG_OBJ,                        /* 62 */
88     INSN_MG_PRIVATE,                    /* 63 */
89     INSN_MG_FLAGS,                      /* 64 */
90     INSN_MG_PV,                 /* 65 */
91     INSN_XMG_STASH,                     /* 66 */
92     INSN_GV_FETCHPV,                    /* 67 */
93     INSN_GV_STASHPV,                    /* 68 */
94     INSN_GP_SV,                 /* 69 */
95     INSN_GP_REFCNT,                     /* 70 */
96     INSN_GP_REFCNT_ADD,                 /* 71 */
97     INSN_GP_AV,                 /* 72 */
98     INSN_GP_HV,                 /* 73 */
99     INSN_GP_CV,                 /* 74 */
100     INSN_GP_FILEGV,                     /* 75 */
101     INSN_GP_IO,                 /* 76 */
102     INSN_GP_FORM,                       /* 77 */
103     INSN_GP_CVGEN,                      /* 78 */
104     INSN_GP_LINE,                       /* 79 */
105     INSN_GP_SHARE,                      /* 80 */
106     INSN_XGV_FLAGS,                     /* 81 */
107     INSN_OP_NEXT,                       /* 82 */
108     INSN_OP_SIBLING,                    /* 83 */
109     INSN_OP_PPADDR,                     /* 84 */
110     INSN_OP_TARG,                       /* 85 */
111     INSN_OP_TYPE,                       /* 86 */
112     INSN_OP_SEQ,                        /* 87 */
113     INSN_OP_FLAGS,                      /* 88 */
114     INSN_OP_PRIVATE,                    /* 89 */
115     INSN_OP_FIRST,                      /* 90 */
116     INSN_OP_LAST,                       /* 91 */
117     INSN_OP_OTHER,                      /* 92 */
118     INSN_OP_TRUE,                       /* 93 */
119     INSN_OP_FALSE,                      /* 94 */
120     INSN_OP_CHILDREN,                   /* 95 */
121     INSN_OP_PMREPLROOT,                 /* 96 */
122     INSN_OP_PMREPLROOTGV,                       /* 97 */
123     INSN_OP_PMREPLSTART,                        /* 98 */
124     INSN_OP_PMNEXT,                     /* 99 */
125     INSN_PREGCOMP,                      /* 100 */
126     INSN_OP_PMSHORT,                    /* 101 */
127     INSN_OP_PMFLAGS,                    /* 102 */
128     INSN_OP_PMPERMFLAGS,                        /* 103 */
129     INSN_OP_PMSLEN,                     /* 104 */
130     INSN_OP_SV,                 /* 105 */
131     INSN_OP_GV,                 /* 106 */
132     INSN_OP_PV,                 /* 107 */
133     INSN_OP_PV_TR,                      /* 108 */
134     INSN_OP_REDOOP,                     /* 109 */
135     INSN_OP_NEXTOP,                     /* 110 */
136     INSN_OP_LASTOP,                     /* 111 */
137     INSN_COP_LABEL,                     /* 112 */
138     INSN_COP_STASH,                     /* 113 */
139     INSN_COP_FILEGV,                    /* 114 */
140     INSN_COP_SEQ,                       /* 115 */
141     INSN_COP_ARYBASE,                   /* 116 */
142     INSN_COP_LINE,                      /* 117 */
143     INSN_MAIN_START,                    /* 118 */
144     INSN_MAIN_ROOT,                     /* 119 */
145     INSN_CURPAD,                        /* 120 */
146     MAX_INSN = 120
147 };
148
149 enum {
150     OPt_OP,             /* 0 */
151     OPt_UNOP,           /* 1 */
152     OPt_BINOP,          /* 2 */
153     OPt_LOGOP,          /* 3 */
154     OPt_CONDOP,         /* 4 */
155     OPt_LISTOP,         /* 5 */
156     OPt_PMOP,           /* 6 */
157     OPt_SVOP,           /* 7 */
158     OPt_GVOP,           /* 8 */
159     OPt_PVOP,           /* 9 */
160     OPt_LOOP,           /* 10 */
161     OPt_COP             /* 11 */
162 };
163
164 EXT int optype_size[]
165 #ifdef DOINIT
166 = {
167     sizeof(OP),
168     sizeof(UNOP),
169     sizeof(BINOP),
170     sizeof(LOGOP),
171     sizeof(CONDOP),
172     sizeof(LISTOP),
173     sizeof(PMOP),
174     sizeof(SVOP),
175     sizeof(GVOP),
176     sizeof(PVOP),
177     sizeof(LOOP),
178     sizeof(COP)
179 }
180 #endif /* DOINIT */
181 ;
182
183 EXT SV * specialsv_list[4]
184 #ifdef DOINIT
185 = { Nullsv, &sv_undef, &sv_yes, &sv_no }
186 #endif /* DOINIT */
187 ;