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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 #define LOAD_NAME 101 /* Index in name list */ | 99 #define LOAD_NAME 101 /* Index in name list */ |
100 #define BUILD_TUPLE 102 /* Number of tuple items */ | 100 #define BUILD_TUPLE 102 /* Number of tuple items */ |
101 #define BUILD_LIST 103 /* Number of list items */ | 101 #define BUILD_LIST 103 /* Number of list items */ |
102 #define BUILD_MAP 104 /* Always zero for now */ | 102 #define BUILD_MAP 104 /* Always zero for now */ |
103 #define LOAD_ATTR 105 /* Index in name list */ | 103 #define LOAD_ATTR 105 /* Index in name list */ |
104 #define COMPARE_OP 106 /* Comparison operator */ | 104 #define COMPARE_OP 106 /* Comparison operator */ |
105 #define IMPORT_NAME 107 /* Index in name list */ | 105 #define IMPORT_NAME 107 /* Index in name list */ |
106 #define IMPORT_FROM 108 /* Index in name list */ | 106 #define IMPORT_FROM 108 /* Index in name list */ |
107 | 107 |
108 #define JUMP_FORWARD 110 /* Number of bytes to skip */ | 108 #define JUMP_FORWARD 110 /* Number of bytes to skip */ |
109 #define JUMP_IF_FALSE» 111» /* "" */ | 109 #define JUMP_IF_FALSE_OR_POP 111 /* Target byte offset from beginning |
110 #define JUMP_IF_TRUE» 112» /* "" */ | 110 of code */ |
111 #define JUMP_ABSOLUTE» 113» /* Target byte offset from beginning of code */ | 111 #define JUMP_IF_TRUE_OR_POP 112»/* "" */ |
| 112 #define JUMP_ABSOLUTE» 113» /* "" */ |
| 113 #define POP_JUMP_IF_FALSE 114» /* "" */ |
| 114 #define POP_JUMP_IF_TRUE 115» /* "" */ |
112 | 115 |
113 #define LOAD_GLOBAL 116 /* Index in name list */ | 116 #define LOAD_GLOBAL 116 /* Index in name list */ |
114 | 117 |
115 #define CONTINUE_LOOP 119 /* Start of loop (absolute) */ | 118 #define CONTINUE_LOOP 119 /* Start of loop (absolute) */ |
116 #define SETUP_LOOP 120 /* Target address (relative) */ | 119 #define SETUP_LOOP 120 /* Target address (relative) */ |
117 #define SETUP_EXCEPT 121 /* "" */ | 120 #define SETUP_EXCEPT 121 /* "" */ |
118 #define SETUP_FINALLY 122 /* "" */ | 121 #define SETUP_FINALLY 122 /* "" */ |
119 | 122 |
120 #define LOAD_FAST 124 /* Local variable number */ | 123 #define LOAD_FAST 124 /* Local variable number */ |
121 #define STORE_FAST 125 /* Local variable number */ | 124 #define STORE_FAST 125 /* Local variable number */ |
(...skipping 22 matching lines...) Expand all Loading... |
144 | 147 |
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, | 148 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}; | 149 PyCmp_IN, PyCmp_NOT_IN, PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, Py
Cmp_BAD}; |
147 | 150 |
148 #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT) | 151 #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT) |
149 | 152 |
150 #ifdef __cplusplus | 153 #ifdef __cplusplus |
151 } | 154 } |
152 #endif | 155 #endif |
153 #endif /* !Py_OPCODE_H */ | 156 #endif /* !Py_OPCODE_H */ |
OLD | NEW |