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