Review issue 4715 from the public Python tracker - Code Review (original) (raw)

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 of code */

110 #define JUMP_IF_TRUE» 112» /* "" */

110 #define JUMP_IF_TRUE_OR_POP 112»/* "" */

111 #define JUMP_ABSOLUTE» 113» /* Target byte offset from beginning of code */

111 #define JUMP_ABSOLUTE» 113» /* "" */

112 #define POP_JUMP_IF_FALSE 114» /* "" */

113 #define POP_JUMP_IF_TRUE 115» /* "" */

112

114

113 #define LOAD_GLOBAL 116 /* Index in name list */

115 #define LOAD_GLOBAL 116 /* Index in name list */

114

116

115 #define CONTINUE_LOOP 119 /* Start of loop (absolute) */

117 #define CONTINUE_LOOP 119 /* Start of loop (absolute) */

116 #define SETUP_LOOP 120 /* Target address (relative) */

118 #define SETUP_LOOP 120 /* Target address (relative) */

117 #define SETUP_EXCEPT 121 /* "" */

119 #define SETUP_EXCEPT 121 /* "" */

118 #define SETUP_FINALLY 122 /* "" */

120 #define SETUP_FINALLY 122 /* "" */

119

121

120 #define LOAD_FAST 124 /* Local variable number */

122 #define LOAD_FAST 124 /* Local variable number */

121 #define STORE_FAST 125 /* Local variable number */

123 #define STORE_FAST 125 /* Local variable number */

(...skipping 22 matching lines...) Expand all Loading...

144

146

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,

147 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};

148 PyCmp_IN, PyCmp_NOT_IN, PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, Py Cmp_BAD};

147

149

148 #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)

150 #define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)

149

151

150 #ifdef __cplusplus

152 #ifdef __cplusplus

151 }

153 }

152 #endif

154 #endif

153 #endif /* !Py_OPCODE_H */

155 #endif /* !Py_OPCODE_H */

OLD

NEW