OLD | NEW |
1 #ifndef Py_OPCODE_H | 1 #ifndef Py_OPCODE_H |
2 #define Py_OPCODE_H | 2 #define Py_OPCODE_H |
3 #ifdef __cplusplus | 3 #ifdef __cplusplus |
4 extern "C" { | 4 extern "C" { |
5 #endif | 5 #endif |
6 | 6 |
7 | 7 |
8 /* Instruction opcodes for compiled code */ | 8 /* Instruction opcodes for compiled code */ |
9 | 9 |
10 #define STOP_CODE 0 | 10 #define STOP_CODE 0 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #define STORE_SUBSCR 60 | 54 #define STORE_SUBSCR 60 |
55 #define DELETE_SUBSCR 61 | 55 #define DELETE_SUBSCR 61 |
56 | 56 |
57 #define BINARY_LSHIFT 62 | 57 #define BINARY_LSHIFT 62 |
58 #define BINARY_RSHIFT 63 | 58 #define BINARY_RSHIFT 63 |
59 #define BINARY_AND 64 | 59 #define BINARY_AND 64 |
60 #define BINARY_XOR 65 | 60 #define BINARY_XOR 65 |
61 #define BINARY_OR 66 | 61 #define BINARY_OR 66 |
62 #define INPLACE_POWER 67 | 62 #define INPLACE_POWER 67 |
63 #define GET_ITER 68 | 63 #define GET_ITER 68 |
64 | 64 #define YIELD_FROM» 69 |
65 #define PRINT_EXPR 70 | 65 #define PRINT_EXPR 70 |
66 #define PRINT_ITEM 71 | 66 #define PRINT_ITEM 71 |
67 #define PRINT_NEWLINE 72 | 67 #define PRINT_NEWLINE 72 |
68 #define PRINT_ITEM_TO 73 | 68 #define PRINT_ITEM_TO 73 |
69 #define PRINT_NEWLINE_TO 74 | 69 #define PRINT_NEWLINE_TO 74 |
70 #define INPLACE_LSHIFT 75 | 70 #define INPLACE_LSHIFT 75 |
71 #define INPLACE_RSHIFT 76 | 71 #define INPLACE_RSHIFT 76 |
72 #define INPLACE_AND 77 | 72 #define INPLACE_AND 77 |
73 #define INPLACE_XOR 78 | 73 #define INPLACE_XOR 78 |
74 #define INPLACE_OR 79 | 74 #define INPLACE_OR 79 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 /* The next 3 opcodes must be contiguous and satisfy | 135 /* The next 3 opcodes must be contiguous and satisfy |
136 (CALL_FUNCTION_VAR - CALL_FUNCTION) & 3 == 1 */ | 136 (CALL_FUNCTION_VAR - CALL_FUNCTION) & 3 == 1 */ |
137 #define CALL_FUNCTION_VAR 140 /* #args + (#kwargs<<8) */ | 137 #define CALL_FUNCTION_VAR 140 /* #args + (#kwargs<<8) */ |
138 #define CALL_FUNCTION_KW 141 /* #args + (#kwargs<<8) */ | 138 #define CALL_FUNCTION_KW 141 /* #args + (#kwargs<<8) */ |
139 #define CALL_FUNCTION_VAR_KW 142 /* #args + (#kwargs<<8) */ | 139 #define CALL_FUNCTION_VAR_KW 142 /* #args + (#kwargs<<8) */ |
140 | 140 |
141 /* Support for opargs more than 16 bits long */ | 141 /* Support for opargs more than 16 bits long */ |
142 #define EXTENDED_ARG 143 | 142 #define EXTENDED_ARG 143 |
143 | 143 |
144 | |
145 enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE, PyC
mp_GT=Py_GT, PyCmp_GE=Py_GE, | 144 enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE, PyC
mp_GT=Py_GT, PyCmp_GE=Py_GE, |
146 PyCmp_IN, PyCmp_NOT_IN, PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, Py
Cmp_BAD}; | 145 PyCmp_IN, PyCmp_NOT_IN, PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, Py
Cmp_BAD}; |
147 | 146 |
148 #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT) | 147 #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT) |
149 | 148 |
150 #ifdef __cplusplus | 149 #ifdef __cplusplus |
151 } | 150 } |
152 #endif | 151 #endif |
153 #endif /* !Py_OPCODE_H */ | 152 #endif /* !Py_OPCODE_H */ |
OLD | NEW |