/home/mdboom/Work/builds/cpython/Include/opcode.h
Line | Count | Source (jump to first uncovered line) |
1 | // Auto-generated by Tools/scripts/generate_opcode_h.py from Lib/opcode.py |
2 | |
3 | #ifndef Py_OPCODE_H |
4 | #define Py_OPCODE_H |
5 | #ifdef __cplusplus |
6 | extern "C" { |
7 | #endif |
8 | |
9 | |
10 | /* Instruction opcodes for compiled code */ |
11 | #define CACHE 0 |
12 | #define POP_TOP 1 |
13 | #define PUSH_NULL 2 |
14 | #define NOP 9 |
15 | #define UNARY_POSITIVE 10 |
16 | #define UNARY_NEGATIVE 11 |
17 | #define UNARY_NOT 12 |
18 | #define UNARY_INVERT 15 |
19 | #define BINARY_SUBSCR 25 |
20 | #define BINARY_SLICE 26 |
21 | #define STORE_SLICE 27 |
22 | #define GET_LEN 30 |
23 | #define MATCH_MAPPING 31 |
24 | #define MATCH_SEQUENCE 32 |
25 | #define MATCH_KEYS 33 |
26 | #define PUSH_EXC_INFO 35 |
27 | #define CHECK_EXC_MATCH 36 |
28 | #define CHECK_EG_MATCH 37 |
29 | #define WITH_EXCEPT_START 49 |
30 | #define GET_AITER 50 |
31 | #define GET_ANEXT 51 |
32 | #define BEFORE_ASYNC_WITH 52 |
33 | #define BEFORE_WITH 53 |
34 | #define END_ASYNC_FOR 54 |
35 | #define STORE_SUBSCR 60 |
36 | #define DELETE_SUBSCR 61 |
37 | #define GET_ITER 68 |
38 | #define GET_YIELD_FROM_ITER 69 |
39 | #define PRINT_EXPR 70 |
40 | #define LOAD_BUILD_CLASS 71 |
41 | #define LOAD_ASSERTION_ERROR 74 |
42 | #define RETURN_GENERATOR 75 |
43 | #define LIST_TO_TUPLE 82 |
44 | #define RETURN_VALUE 83 |
45 | #define IMPORT_STAR 84 |
46 | #define SETUP_ANNOTATIONS 85 |
47 | #define ASYNC_GEN_WRAP 87 |
48 | #define PREP_RERAISE_STAR 88 |
49 | #define POP_EXCEPT 89 |
50 | #define HAVE_ARGUMENT 90 |
51 | #define STORE_NAME 90 |
52 | #define DELETE_NAME 91 |
53 | #define UNPACK_SEQUENCE 92 |
54 | #define FOR_ITER 93 |
55 | #define UNPACK_EX 94 |
56 | #define STORE_ATTR 95 |
57 | #define DELETE_ATTR 96 |
58 | #define STORE_GLOBAL 97 |
59 | #define DELETE_GLOBAL 98 |
60 | #define SWAP 99 |
61 | #define LOAD_CONST 100 |
62 | #define LOAD_NAME 101 |
63 | #define BUILD_TUPLE 102 |
64 | #define BUILD_LIST 103 |
65 | #define BUILD_SET 104 |
66 | #define BUILD_MAP 105 |
67 | #define LOAD_ATTR 106 |
68 | #define COMPARE_OP 107 |
69 | #define IMPORT_NAME 108 |
70 | #define IMPORT_FROM 109 |
71 | #define JUMP_FORWARD 110 |
72 | #define JUMP_IF_FALSE_OR_POP 111 |
73 | #define JUMP_IF_TRUE_OR_POP 112 |
74 | #define POP_JUMP_FORWARD_IF_FALSE 114 |
75 | #define POP_JUMP_FORWARD_IF_TRUE 115 |
76 | #define LOAD_GLOBAL 116 |
77 | #define IS_OP 117 |
78 | #define CONTAINS_OP 118 |
79 | #define RERAISE 119 |
80 | #define COPY 120 |
81 | #define BINARY_OP 122 |
82 | #define SEND 123 |
83 | #define LOAD_FAST 124 |
84 | #define STORE_FAST 125 |
85 | #define DELETE_FAST 126 |
86 | #define LOAD_FAST_CHECK 127 |
87 | #define POP_JUMP_FORWARD_IF_NOT_NONE 128 |
88 | #define POP_JUMP_FORWARD_IF_NONE 129 |
89 | #define RAISE_VARARGS 130 |
90 | #define GET_AWAITABLE 131 |
91 | #define MAKE_FUNCTION 132 |
92 | #define BUILD_SLICE 133 |
93 | #define JUMP_BACKWARD_NO_INTERRUPT 134 |
94 | #define MAKE_CELL 135 |
95 | #define LOAD_CLOSURE 136 |
96 | #define LOAD_DEREF 137 |
97 | #define STORE_DEREF 138 |
98 | #define DELETE_DEREF 139 |
99 | #define JUMP_BACKWARD 140 |
100 | #define CALL_FUNCTION_EX 142 |
101 | #define EXTENDED_ARG 144 |
102 | #define LIST_APPEND 145 |
103 | #define SET_ADD 146 |
104 | #define MAP_ADD 147 |
105 | #define LOAD_CLASSDEREF 148 |
106 | #define COPY_FREE_VARS 149 |
107 | #define YIELD_VALUE 150 |
108 | #define RESUME 151 |
109 | #define MATCH_CLASS 152 |
110 | #define FORMAT_VALUE 155 |
111 | #define BUILD_CONST_KEY_MAP 156 |
112 | #define BUILD_STRING 157 |
113 | #define LIST_EXTEND 162 |
114 | #define SET_UPDATE 163 |
115 | #define DICT_MERGE 164 |
116 | #define DICT_UPDATE 165 |
117 | #define CALL 171 |
118 | #define KW_NAMES 172 |
119 | #define POP_JUMP_BACKWARD_IF_NOT_NONE 173 |
120 | #define POP_JUMP_BACKWARD_IF_NONE 174 |
121 | #define POP_JUMP_BACKWARD_IF_FALSE 175 |
122 | #define POP_JUMP_BACKWARD_IF_TRUE 176 |
123 | #define MIN_PSEUDO_OPCODE 256 |
124 | #define SETUP_FINALLY 256 |
125 | #define SETUP_CLEANUP 257 |
126 | #define SETUP_WITH 258 |
127 | #define POP_BLOCK 259 |
128 | #define JUMP 260 |
129 | #define JUMP_NO_INTERRUPT 261 |
130 | #define POP_JUMP_IF_FALSE 262 |
131 | #define POP_JUMP_IF_TRUE 263 |
132 | #define POP_JUMP_IF_NONE 264 |
133 | #define POP_JUMP_IF_NOT_NONE 265 |
134 | #define LOAD_METHOD 266 |
135 | #define MAX_PSEUDO_OPCODE 266 |
136 | #define BINARY_OP_ADAPTIVE 3 |
137 | #define BINARY_OP_ADD_FLOAT 4 |
138 | #define BINARY_OP_ADD_INT 5 |
139 | #define BINARY_OP_ADD_UNICODE 6 |
140 | #define BINARY_OP_INPLACE_ADD_UNICODE 7 |
141 | #define BINARY_OP_MULTIPLY_FLOAT 8 |
142 | #define BINARY_OP_MULTIPLY_INT 13 |
143 | #define BINARY_OP_SUBTRACT_FLOAT 14 |
144 | #define BINARY_OP_SUBTRACT_INT 16 |
145 | #define BINARY_SUBSCR_ADAPTIVE 17 |
146 | #define BINARY_SUBSCR_DICT 18 |
147 | #define BINARY_SUBSCR_GETITEM 19 |
148 | #define BINARY_SUBSCR_LIST_INT 20 |
149 | #define BINARY_SUBSCR_TUPLE_INT 21 |
150 | #define CALL_ADAPTIVE 22 |
151 | #define CALL_PY_EXACT_ARGS 23 |
152 | #define CALL_PY_WITH_DEFAULTS 24 |
153 | #define CALL_BOUND_METHOD_EXACT_ARGS 28 |
154 | #define CALL_BUILTIN_CLASS 29 |
155 | #define CALL_BUILTIN_FAST_WITH_KEYWORDS 34 |
156 | #define CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS 38 |
157 | #define CALL_NO_KW_BUILTIN_FAST 39 |
158 | #define CALL_NO_KW_BUILTIN_O 40 |
159 | #define CALL_NO_KW_ISINSTANCE 41 |
160 | #define CALL_NO_KW_LEN 42 |
161 | #define CALL_NO_KW_LIST_APPEND 43 |
162 | #define CALL_NO_KW_METHOD_DESCRIPTOR_FAST 44 |
163 | #define CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 45 |
164 | #define CALL_NO_KW_METHOD_DESCRIPTOR_O 46 |
165 | #define CALL_NO_KW_STR_1 47 |
166 | #define CALL_NO_KW_TUPLE_1 48 |
167 | #define CALL_NO_KW_TYPE_1 55 |
168 | #define COMPARE_OP_ADAPTIVE 56 |
169 | #define COMPARE_OP_FLOAT_JUMP 57 |
170 | #define COMPARE_OP_INT_JUMP 58 |
171 | #define COMPARE_OP_STR_JUMP 59 |
172 | #define EXTENDED_ARG_QUICK 62 |
173 | #define FOR_ITER_ADAPTIVE 63 |
174 | #define FOR_ITER_LIST 64 |
175 | #define FOR_ITER_RANGE 65 |
176 | #define JUMP_BACKWARD_QUICK 66 |
177 | #define LOAD_ATTR_ADAPTIVE 67 |
178 | #define LOAD_ATTR_CLASS 72 |
179 | #define LOAD_ATTR_INSTANCE_VALUE 73 |
180 | #define LOAD_ATTR_MODULE 76 |
181 | #define LOAD_ATTR_PROPERTY 77 |
182 | #define LOAD_ATTR_SLOT 78 |
183 | #define LOAD_ATTR_WITH_HINT 79 |
184 | #define LOAD_ATTR_METHOD_LAZY_DICT 80 |
185 | #define LOAD_ATTR_METHOD_NO_DICT 81 |
186 | #define LOAD_ATTR_METHOD_WITH_DICT 86 |
187 | #define LOAD_ATTR_METHOD_WITH_VALUES 113 |
188 | #define LOAD_CONST__LOAD_FAST 121 |
189 | #define LOAD_FAST__LOAD_CONST 141 |
190 | #define LOAD_FAST__LOAD_FAST 143 |
191 | #define LOAD_GLOBAL_ADAPTIVE 153 |
192 | #define LOAD_GLOBAL_BUILTIN 154 |
193 | #define LOAD_GLOBAL_MODULE 158 |
194 | #define RESUME_QUICK 159 |
195 | #define STORE_ATTR_ADAPTIVE 160 |
196 | #define STORE_ATTR_INSTANCE_VALUE 161 |
197 | #define STORE_ATTR_SLOT 166 |
198 | #define STORE_ATTR_WITH_HINT 167 |
199 | #define STORE_FAST__LOAD_FAST 168 |
200 | #define STORE_FAST__STORE_FAST 169 |
201 | #define STORE_SUBSCR_ADAPTIVE 170 |
202 | #define STORE_SUBSCR_DICT 177 |
203 | #define STORE_SUBSCR_LIST_INT 178 |
204 | #define UNPACK_SEQUENCE_ADAPTIVE 179 |
205 | #define UNPACK_SEQUENCE_LIST 180 |
206 | #define UNPACK_SEQUENCE_TUPLE 181 |
207 | #define UNPACK_SEQUENCE_TWO_TUPLE 182 |
208 | #define DO_TRACING 255 |
209 | |
210 | #define HAS_ARG(op) ((((op) >= HAVE_ARGUMENT) && (!13.9M IS_PSEUDO_OPCODE13.9M (op)))\ |
211 | || ((op) == 2.30M JUMP2.30M ) \ |
212 | || ((op) == 2.30M JUMP_NO_INTERRUPT2.30M ) \ |
213 | || ((op) == 2.30M POP_JUMP_IF_FALSE2.30M ) \ |
214 | || ((op) == 2.30M POP_JUMP_IF_TRUE2.30M ) \ |
215 | || ((op) == 2.30M POP_JUMP_IF_NONE2.30M ) \ |
216 | || ((op) == 2.30M POP_JUMP_IF_NOT_NONE2.30M ) \ |
217 | || ((op) == 2.30M LOAD_METHOD2.30M ) \ |
218 | ) |
219 | |
220 | #define HAS_CONST(op) (false\ |
221 | || ((op) == LOAD_CONST) \ |
222 | || ((op) == 26.8k KW_NAMES26.8k ) \ |
223 | ) |
224 | |
225 | #define NB_ADD 0 |
226 | #define NB_AND 1 |
227 | #define NB_FLOOR_DIVIDE 2 |
228 | #define NB_LSHIFT 3 |
229 | #define NB_MATRIX_MULTIPLY 4 |
230 | #define NB_MULTIPLY 5 |
231 | #define NB_REMAINDER 6 |
232 | #define NB_OR 7 |
233 | #define NB_POWER 8 |
234 | #define NB_RSHIFT 9 |
235 | #define NB_SUBTRACT 10 |
236 | #define NB_TRUE_DIVIDE 11 |
237 | #define NB_XOR 12 |
238 | #define NB_INPLACE_ADD 13 |
239 | #define NB_INPLACE_AND 14 |
240 | #define NB_INPLACE_FLOOR_DIVIDE 15 |
241 | #define NB_INPLACE_LSHIFT 16 |
242 | #define NB_INPLACE_MATRIX_MULTIPLY 17 |
243 | #define NB_INPLACE_MULTIPLY 18 |
244 | #define NB_INPLACE_REMAINDER 19 |
245 | #define NB_INPLACE_OR 20 |
246 | #define NB_INPLACE_POWER 21 |
247 | #define NB_INPLACE_RSHIFT 22 |
248 | #define NB_INPLACE_SUBTRACT 23 |
249 | #define NB_INPLACE_TRUE_DIVIDE 24 |
250 | #define NB_INPLACE_XOR 25 |
251 | |
252 | |
253 | #define IS_PSEUDO_OPCODE(op) (((op) >= MIN_PSEUDO_OPCODE) && ((op) <= 0 MAX_PSEUDO_OPCODE0 )) |
254 | |
255 | #ifdef __cplusplus |
256 | } |
257 | #endif |
258 | #endif /* !Py_OPCODE_H */ |