Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
allendowney
GitHub Repository: allendowney/cpython
Path: blob/main/Include/opcode.h
12 views
1
// Auto-generated by Tools/build/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 INTERPRETER_EXIT 3
15
#define END_FOR 4
16
#define END_SEND 5
17
#define TO_BOOL 6
18
#define NOP 9
19
#define UNARY_NEGATIVE 11
20
#define UNARY_NOT 12
21
#define UNARY_INVERT 15
22
#define EXIT_INIT_CHECK 16
23
#define RESERVED 17
24
#define MAKE_FUNCTION 24
25
#define BINARY_SUBSCR 25
26
#define BINARY_SLICE 26
27
#define STORE_SLICE 27
28
#define GET_LEN 30
29
#define MATCH_MAPPING 31
30
#define MATCH_SEQUENCE 32
31
#define MATCH_KEYS 33
32
#define PUSH_EXC_INFO 35
33
#define CHECK_EXC_MATCH 36
34
#define CHECK_EG_MATCH 37
35
#define FORMAT_SIMPLE 40
36
#define FORMAT_WITH_SPEC 41
37
#define WITH_EXCEPT_START 49
38
#define GET_AITER 50
39
#define GET_ANEXT 51
40
#define BEFORE_ASYNC_WITH 52
41
#define BEFORE_WITH 53
42
#define END_ASYNC_FOR 54
43
#define CLEANUP_THROW 55
44
#define STORE_SUBSCR 60
45
#define DELETE_SUBSCR 61
46
#define GET_ITER 68
47
#define GET_YIELD_FROM_ITER 69
48
#define LOAD_BUILD_CLASS 71
49
#define LOAD_ASSERTION_ERROR 74
50
#define RETURN_GENERATOR 75
51
#define RETURN_VALUE 83
52
#define SETUP_ANNOTATIONS 85
53
#define LOAD_LOCALS 87
54
#define POP_EXCEPT 89
55
#define STORE_NAME 90
56
#define DELETE_NAME 91
57
#define UNPACK_SEQUENCE 92
58
#define FOR_ITER 93
59
#define UNPACK_EX 94
60
#define STORE_ATTR 95
61
#define DELETE_ATTR 96
62
#define STORE_GLOBAL 97
63
#define DELETE_GLOBAL 98
64
#define SWAP 99
65
#define LOAD_CONST 100
66
#define LOAD_NAME 101
67
#define BUILD_TUPLE 102
68
#define BUILD_LIST 103
69
#define BUILD_SET 104
70
#define BUILD_MAP 105
71
#define LOAD_ATTR 106
72
#define COMPARE_OP 107
73
#define IMPORT_NAME 108
74
#define IMPORT_FROM 109
75
#define JUMP_FORWARD 110
76
#define POP_JUMP_IF_FALSE 114
77
#define POP_JUMP_IF_TRUE 115
78
#define LOAD_GLOBAL 116
79
#define IS_OP 117
80
#define CONTAINS_OP 118
81
#define RERAISE 119
82
#define COPY 120
83
#define RETURN_CONST 121
84
#define BINARY_OP 122
85
#define SEND 123
86
#define LOAD_FAST 124
87
#define STORE_FAST 125
88
#define DELETE_FAST 126
89
#define LOAD_FAST_CHECK 127
90
#define POP_JUMP_IF_NOT_NONE 128
91
#define POP_JUMP_IF_NONE 129
92
#define RAISE_VARARGS 130
93
#define GET_AWAITABLE 131
94
#define BUILD_SLICE 133
95
#define JUMP_BACKWARD_NO_INTERRUPT 134
96
#define MAKE_CELL 135
97
#define LOAD_DEREF 137
98
#define STORE_DEREF 138
99
#define DELETE_DEREF 139
100
#define JUMP_BACKWARD 140
101
#define LOAD_SUPER_ATTR 141
102
#define CALL_FUNCTION_EX 142
103
#define LOAD_FAST_AND_CLEAR 143
104
#define EXTENDED_ARG 144
105
#define LIST_APPEND 145
106
#define SET_ADD 146
107
#define MAP_ADD 147
108
#define COPY_FREE_VARS 149
109
#define YIELD_VALUE 150
110
#define RESUME 151
111
#define MATCH_CLASS 152
112
#define BUILD_CONST_KEY_MAP 156
113
#define BUILD_STRING 157
114
#define CONVERT_VALUE 158
115
#define LIST_EXTEND 162
116
#define SET_UPDATE 163
117
#define DICT_MERGE 164
118
#define DICT_UPDATE 165
119
#define LOAD_FAST_LOAD_FAST 168
120
#define STORE_FAST_LOAD_FAST 169
121
#define STORE_FAST_STORE_FAST 170
122
#define CALL 171
123
#define KW_NAMES 172
124
#define CALL_INTRINSIC_1 173
125
#define CALL_INTRINSIC_2 174
126
#define LOAD_FROM_DICT_OR_GLOBALS 175
127
#define LOAD_FROM_DICT_OR_DEREF 176
128
#define SET_FUNCTION_ATTRIBUTE 177
129
#define ENTER_EXECUTOR 230
130
#define MIN_INSTRUMENTED_OPCODE 237
131
#define INSTRUMENTED_LOAD_SUPER_ATTR 237
132
#define INSTRUMENTED_POP_JUMP_IF_NONE 238
133
#define INSTRUMENTED_POP_JUMP_IF_NOT_NONE 239
134
#define INSTRUMENTED_RESUME 240
135
#define INSTRUMENTED_CALL 241
136
#define INSTRUMENTED_RETURN_VALUE 242
137
#define INSTRUMENTED_YIELD_VALUE 243
138
#define INSTRUMENTED_CALL_FUNCTION_EX 244
139
#define INSTRUMENTED_JUMP_FORWARD 245
140
#define INSTRUMENTED_JUMP_BACKWARD 246
141
#define INSTRUMENTED_RETURN_CONST 247
142
#define INSTRUMENTED_FOR_ITER 248
143
#define INSTRUMENTED_POP_JUMP_IF_FALSE 249
144
#define INSTRUMENTED_POP_JUMP_IF_TRUE 250
145
#define INSTRUMENTED_END_FOR 251
146
#define INSTRUMENTED_END_SEND 252
147
#define INSTRUMENTED_INSTRUCTION 253
148
#define INSTRUMENTED_LINE 254
149
#define MIN_PSEUDO_OPCODE 256
150
#define SETUP_FINALLY 256
151
#define SETUP_CLEANUP 257
152
#define SETUP_WITH 258
153
#define POP_BLOCK 259
154
#define JUMP 260
155
#define JUMP_NO_INTERRUPT 261
156
#define LOAD_METHOD 262
157
#define LOAD_SUPER_METHOD 263
158
#define LOAD_ZERO_SUPER_METHOD 264
159
#define LOAD_ZERO_SUPER_ATTR 265
160
#define STORE_FAST_MAYBE_NULL 266
161
#define LOAD_CLOSURE 267
162
#define MAX_PSEUDO_OPCODE 267
163
#define TO_BOOL_ALWAYS_TRUE 7
164
#define TO_BOOL_BOOL 8
165
#define TO_BOOL_INT 10
166
#define TO_BOOL_LIST 13
167
#define TO_BOOL_NONE 14
168
#define TO_BOOL_STR 18
169
#define BINARY_OP_MULTIPLY_INT 19
170
#define BINARY_OP_ADD_INT 20
171
#define BINARY_OP_SUBTRACT_INT 21
172
#define BINARY_OP_MULTIPLY_FLOAT 22
173
#define BINARY_OP_ADD_FLOAT 23
174
#define BINARY_OP_SUBTRACT_FLOAT 28
175
#define BINARY_OP_ADD_UNICODE 29
176
#define BINARY_OP_INPLACE_ADD_UNICODE 34
177
#define BINARY_SUBSCR_DICT 38
178
#define BINARY_SUBSCR_GETITEM 39
179
#define BINARY_SUBSCR_LIST_INT 42
180
#define BINARY_SUBSCR_TUPLE_INT 43
181
#define STORE_SUBSCR_DICT 44
182
#define STORE_SUBSCR_LIST_INT 45
183
#define SEND_GEN 46
184
#define UNPACK_SEQUENCE_TWO_TUPLE 47
185
#define UNPACK_SEQUENCE_TUPLE 48
186
#define UNPACK_SEQUENCE_LIST 56
187
#define STORE_ATTR_INSTANCE_VALUE 57
188
#define STORE_ATTR_SLOT 58
189
#define STORE_ATTR_WITH_HINT 59
190
#define LOAD_GLOBAL_MODULE 62
191
#define LOAD_GLOBAL_BUILTIN 63
192
#define LOAD_SUPER_ATTR_ATTR 64
193
#define LOAD_SUPER_ATTR_METHOD 65
194
#define LOAD_ATTR_INSTANCE_VALUE 66
195
#define LOAD_ATTR_MODULE 67
196
#define LOAD_ATTR_WITH_HINT 70
197
#define LOAD_ATTR_SLOT 72
198
#define LOAD_ATTR_CLASS 73
199
#define LOAD_ATTR_PROPERTY 76
200
#define LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN 77
201
#define LOAD_ATTR_METHOD_WITH_VALUES 78
202
#define LOAD_ATTR_METHOD_NO_DICT 79
203
#define LOAD_ATTR_METHOD_LAZY_DICT 80
204
#define COMPARE_OP_FLOAT 81
205
#define COMPARE_OP_INT 82
206
#define COMPARE_OP_STR 84
207
#define FOR_ITER_LIST 86
208
#define FOR_ITER_TUPLE 88
209
#define FOR_ITER_RANGE 111
210
#define FOR_ITER_GEN 112
211
#define CALL_BOUND_METHOD_EXACT_ARGS 113
212
#define CALL_PY_EXACT_ARGS 132
213
#define CALL_PY_WITH_DEFAULTS 136
214
#define CALL_NO_KW_TYPE_1 148
215
#define CALL_NO_KW_STR_1 153
216
#define CALL_NO_KW_TUPLE_1 154
217
#define CALL_BUILTIN_CLASS 155
218
#define CALL_NO_KW_BUILTIN_O 159
219
#define CALL_NO_KW_BUILTIN_FAST 160
220
#define CALL_BUILTIN_FAST_WITH_KEYWORDS 161
221
#define CALL_NO_KW_LEN 166
222
#define CALL_NO_KW_ISINSTANCE 167
223
#define CALL_NO_KW_LIST_APPEND 178
224
#define CALL_NO_KW_METHOD_DESCRIPTOR_O 179
225
#define CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS 180
226
#define CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 181
227
#define CALL_NO_KW_METHOD_DESCRIPTOR_FAST 182
228
#define CALL_NO_KW_ALLOC_AND_ENTER_INIT 183
229
230
#define NB_ADD 0
231
#define NB_AND 1
232
#define NB_FLOOR_DIVIDE 2
233
#define NB_LSHIFT 3
234
#define NB_MATRIX_MULTIPLY 4
235
#define NB_MULTIPLY 5
236
#define NB_REMAINDER 6
237
#define NB_OR 7
238
#define NB_POWER 8
239
#define NB_RSHIFT 9
240
#define NB_SUBTRACT 10
241
#define NB_TRUE_DIVIDE 11
242
#define NB_XOR 12
243
#define NB_INPLACE_ADD 13
244
#define NB_INPLACE_AND 14
245
#define NB_INPLACE_FLOOR_DIVIDE 15
246
#define NB_INPLACE_LSHIFT 16
247
#define NB_INPLACE_MATRIX_MULTIPLY 17
248
#define NB_INPLACE_MULTIPLY 18
249
#define NB_INPLACE_REMAINDER 19
250
#define NB_INPLACE_OR 20
251
#define NB_INPLACE_POWER 21
252
#define NB_INPLACE_RSHIFT 22
253
#define NB_INPLACE_SUBTRACT 23
254
#define NB_INPLACE_TRUE_DIVIDE 24
255
#define NB_INPLACE_XOR 25
256
257
/* Defined in Lib/opcode.py */
258
#define ENABLE_SPECIALIZATION 1
259
260
#ifdef __cplusplus
261
}
262
#endif
263
#endif /* !Py_OPCODE_H */
264
265