[ID 20011201.170] Time::HiRes in devel-perl causes segfaults for xs users
[p5sagit/p5-mst-13.2.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 byteloader_fdata {
12     SV  *datasv;
13     int next_out;
14     int idx;
15 };
16
17 struct byteloader_state {
18     struct byteloader_fdata     *bs_fdata;
19     SV                          *bs_sv;
20     void                        **bs_obj_list;
21     int                         bs_obj_list_fill;
22     XPV                         bs_pv;
23     int                         bs_iv_overflows;
24 };
25
26 int bl_getc(struct byteloader_fdata *);
27 int bl_read(struct byteloader_fdata *, char *, size_t, size_t);
28 extern void byterun(pTHX_ struct byteloader_state *);
29
30 enum {
31     INSN_RET,                   /* 0 */
32     INSN_LDSV,                  /* 1 */
33     INSN_LDOP,                  /* 2 */
34     INSN_STSV,                  /* 3 */
35     INSN_STOP,                  /* 4 */
36     INSN_STPV,                  /* 5 */
37     INSN_LDSPECSV,                      /* 6 */
38     INSN_NEWSV,                 /* 7 */
39     INSN_NEWOP,                 /* 8 */
40     INSN_NEWOPN,                        /* 9 */
41     INSN_NOP,                   /* 10 */
42     INSN_NEWPV,                 /* 11 */
43     INSN_PV_CUR,                        /* 12 */
44     INSN_PV_FREE,                       /* 13 */
45     INSN_SV_UPGRADE,                    /* 14 */
46     INSN_SV_REFCNT,                     /* 15 */
47     INSN_SV_REFCNT_ADD,                 /* 16 */
48     INSN_SV_FLAGS,                      /* 17 */
49     INSN_XRV,                   /* 18 */
50     INSN_XPV,                   /* 19 */
51     INSN_XIV32,                 /* 20 */
52     INSN_XIV64,                 /* 21 */
53     INSN_XNV,                   /* 22 */
54     INSN_XLV_TARGOFF,                   /* 23 */
55     INSN_XLV_TARGLEN,                   /* 24 */
56     INSN_XLV_TARG,                      /* 25 */
57     INSN_XLV_TYPE,                      /* 26 */
58     INSN_XBM_USEFUL,                    /* 27 */
59     INSN_XBM_PREVIOUS,                  /* 28 */
60     INSN_XBM_RARE,                      /* 29 */
61     INSN_XFM_LINES,                     /* 30 */
62     INSN_XIO_LINES,                     /* 31 */
63     INSN_XIO_PAGE,                      /* 32 */
64     INSN_XIO_PAGE_LEN,                  /* 33 */
65     INSN_XIO_LINES_LEFT,                        /* 34 */
66     INSN_COMMENT,                       /* 35 */
67     INSN_XIO_TOP_NAME,                  /* 36 */
68     INSN_XIO_TOP_GV,                    /* 37 */
69     INSN_XIO_FMT_NAME,                  /* 38 */
70     INSN_XIO_FMT_GV,                    /* 39 */
71     INSN_XIO_BOTTOM_NAME,                       /* 40 */
72     INSN_XIO_BOTTOM_GV,                 /* 41 */
73     INSN_XIO_SUBPROCESS,                        /* 42 */
74     INSN_XIO_TYPE,                      /* 43 */
75     INSN_XIO_FLAGS,                     /* 44 */
76     INSN_XCV_STASH,                     /* 45 */
77     INSN_XCV_START,                     /* 46 */
78     INSN_XCV_ROOT,                      /* 47 */
79     INSN_XCV_GV,                        /* 48 */
80     INSN_XCV_FILE,                      /* 49 */
81     INSN_XCV_DEPTH,                     /* 50 */
82     INSN_XCV_PADLIST,                   /* 51 */
83     INSN_XCV_OUTSIDE,                   /* 52 */
84     INSN_XCV_FLAGS,                     /* 53 */
85     INSN_AV_EXTEND,                     /* 54 */
86     INSN_AV_PUSH,                       /* 55 */
87     INSN_XAV_FILL,                      /* 56 */
88     INSN_XAV_MAX,                       /* 57 */
89     INSN_XAV_FLAGS,                     /* 58 */
90     INSN_XHV_RITER,                     /* 59 */
91     INSN_XHV_NAME,                      /* 60 */
92     INSN_HV_STORE,                      /* 61 */
93     INSN_SV_MAGIC,                      /* 62 */
94     INSN_MG_OBJ,                        /* 63 */
95     INSN_MG_PRIVATE,                    /* 64 */
96     INSN_MG_FLAGS,                      /* 65 */
97     INSN_MG_PV,                 /* 66 */
98     INSN_XMG_STASH,                     /* 67 */
99     INSN_GV_FETCHPV,                    /* 68 */
100     INSN_GV_STASHPV,                    /* 69 */
101     INSN_GP_SV,                 /* 70 */
102     INSN_GP_REFCNT,                     /* 71 */
103     INSN_GP_REFCNT_ADD,                 /* 72 */
104     INSN_GP_AV,                 /* 73 */
105     INSN_GP_HV,                 /* 74 */
106     INSN_GP_CV,                 /* 75 */
107     INSN_GP_FILE,                       /* 76 */
108     INSN_GP_IO,                 /* 77 */
109     INSN_GP_FORM,                       /* 78 */
110     INSN_GP_CVGEN,                      /* 79 */
111     INSN_GP_LINE,                       /* 80 */
112     INSN_GP_SHARE,                      /* 81 */
113     INSN_XGV_FLAGS,                     /* 82 */
114     INSN_OP_NEXT,                       /* 83 */
115     INSN_OP_SIBLING,                    /* 84 */
116     INSN_OP_PPADDR,                     /* 85 */
117     INSN_OP_TARG,                       /* 86 */
118     INSN_OP_TYPE,                       /* 87 */
119     INSN_OP_SEQ,                        /* 88 */
120     INSN_OP_FLAGS,                      /* 89 */
121     INSN_OP_PRIVATE,                    /* 90 */
122     INSN_OP_FIRST,                      /* 91 */
123     INSN_OP_LAST,                       /* 92 */
124     INSN_OP_OTHER,                      /* 93 */
125     INSN_OP_PMREPLROOT,                 /* 94 */
126     INSN_OP_PMREPLROOTGV,                       /* 95 */
127     INSN_OP_PMREPLSTART,                        /* 96 */
128     INSN_OP_PMNEXT,                     /* 97 */
129     INSN_PREGCOMP,                      /* 98 */
130     INSN_OP_PMFLAGS,                    /* 99 */
131     INSN_OP_PMPERMFLAGS,                        /* 100 */
132     INSN_OP_SV,                 /* 101 */
133     INSN_OP_PADIX,                      /* 102 */
134     INSN_OP_PV,                 /* 103 */
135     INSN_OP_PV_TR,                      /* 104 */
136     INSN_OP_REDOOP,                     /* 105 */
137     INSN_OP_NEXTOP,                     /* 106 */
138     INSN_OP_LASTOP,                     /* 107 */
139     INSN_COP_LABEL,                     /* 108 */
140     INSN_COP_STASHPV,                   /* 109 */
141     INSN_COP_FILE,                      /* 110 */
142     INSN_COP_SEQ,                       /* 111 */
143     INSN_COP_ARYBASE,                   /* 112 */
144     INSN_COP_LINE,                      /* 113 */
145     INSN_COP_WARNINGS,                  /* 114 */
146     INSN_MAIN_START,                    /* 115 */
147     INSN_MAIN_ROOT,                     /* 116 */
148     INSN_CURPAD,                        /* 117 */
149     INSN_PUSH_BEGIN,                    /* 118 */
150     INSN_PUSH_INIT,                     /* 119 */
151     INSN_PUSH_END,                      /* 120 */
152     MAX_INSN = 120
153 };
154
155 enum {
156     OPt_OP,             /* 0 */
157     OPt_UNOP,           /* 1 */
158     OPt_BINOP,          /* 2 */
159     OPt_LOGOP,          /* 3 */
160     OPt_LISTOP,         /* 4 */
161     OPt_PMOP,           /* 5 */
162     OPt_SVOP,           /* 6 */
163     OPt_PADOP,          /* 7 */
164     OPt_PVOP,           /* 8 */
165     OPt_LOOP,           /* 9 */
166     OPt_COP             /* 10 */
167 };
168