diff options
| author | Mark Shannon <mark@hotpy.org> | 2022-02-18 17:19:08 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-18 17:19:08 +0000 |
| commit | cf345e945f48f54785799390c2e92c5310847bd4 (patch) | |
| tree | af28be223953ba50ff6d0c5110af7a8c2a6c4f84 /Include/opcode.h | |
| parent | e2c28616ce6c3cdb1013c415125220a0b86b86a1 (diff) | |
| download | cpython-git-cf345e945f48f54785799390c2e92c5310847bd4.tar.gz | |
bpo-46329: Change calling sequence (again) (GH-31373)
* Change calling sequence: Add PUSH_NULL. Merge PRECALL_FUNCTION and PRECALL_METHOD into PRECALL.
Diffstat (limited to 'Include/opcode.h')
| -rw-r--r-- | Include/opcode.h | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/Include/opcode.h b/Include/opcode.h index df45e7b5e5..df93a93fbb 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -8,6 +8,7 @@ extern "C" { /* Instruction opcodes for compiled code */ #define POP_TOP 1 +#define PUSH_NULL 2 #define NOP 9 #define UNARY_POSITIVE 10 #define UNARY_NEGATIVE 11 @@ -109,75 +110,74 @@ extern "C" { #define SET_UPDATE 163 #define DICT_MERGE 164 #define DICT_UPDATE 165 -#define PRECALL_FUNCTION 167 -#define PRECALL_METHOD 168 +#define PRECALL 166 #define CALL 171 #define KW_NAMES 172 -#define BINARY_OP_ADAPTIVE 2 -#define BINARY_OP_ADD_INT 3 -#define BINARY_OP_ADD_FLOAT 4 -#define BINARY_OP_ADD_UNICODE 5 -#define BINARY_OP_INPLACE_ADD_UNICODE 6 -#define BINARY_OP_MULTIPLY_INT 7 -#define BINARY_OP_MULTIPLY_FLOAT 8 -#define BINARY_OP_SUBTRACT_INT 13 -#define BINARY_OP_SUBTRACT_FLOAT 14 -#define COMPARE_OP_ADAPTIVE 16 -#define COMPARE_OP_FLOAT_JUMP 17 -#define COMPARE_OP_INT_JUMP 18 -#define COMPARE_OP_STR_JUMP 19 -#define BINARY_SUBSCR_ADAPTIVE 20 -#define BINARY_SUBSCR_GETITEM 21 -#define BINARY_SUBSCR_LIST_INT 22 -#define BINARY_SUBSCR_TUPLE_INT 23 -#define BINARY_SUBSCR_DICT 24 -#define STORE_SUBSCR_ADAPTIVE 26 -#define STORE_SUBSCR_LIST_INT 27 -#define STORE_SUBSCR_DICT 28 -#define CALL_ADAPTIVE 29 -#define CALL_BUILTIN_CLASS 34 -#define CALL_NO_KW_BUILTIN_O 36 -#define CALL_NO_KW_BUILTIN_FAST 37 -#define CALL_BUILTIN_FAST_WITH_KEYWORDS 38 -#define CALL_NO_KW_LEN 39 -#define CALL_NO_KW_ISINSTANCE 40 -#define CALL_PY_EXACT_ARGS 41 -#define CALL_PY_WITH_DEFAULTS 42 -#define CALL_NO_KW_LIST_APPEND 43 -#define CALL_NO_KW_METHOD_DESCRIPTOR_O 44 -#define CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 45 -#define CALL_NO_KW_STR_1 46 -#define CALL_NO_KW_TUPLE_1 47 -#define CALL_NO_KW_TYPE_1 48 -#define CALL_NO_KW_METHOD_DESCRIPTOR_FAST 55 -#define JUMP_ABSOLUTE_QUICK 56 -#define LOAD_ATTR_ADAPTIVE 57 -#define LOAD_ATTR_INSTANCE_VALUE 58 -#define LOAD_ATTR_WITH_HINT 59 -#define LOAD_ATTR_SLOT 62 -#define LOAD_ATTR_MODULE 63 -#define LOAD_GLOBAL_ADAPTIVE 64 -#define LOAD_GLOBAL_MODULE 65 -#define LOAD_GLOBAL_BUILTIN 66 -#define LOAD_METHOD_ADAPTIVE 67 -#define LOAD_METHOD_CACHED 72 -#define LOAD_METHOD_CLASS 76 -#define LOAD_METHOD_MODULE 77 -#define LOAD_METHOD_NO_DICT 78 -#define RESUME_QUICK 79 -#define STORE_ATTR_ADAPTIVE 80 -#define STORE_ATTR_INSTANCE_VALUE 81 -#define STORE_ATTR_SLOT 131 -#define STORE_ATTR_WITH_HINT 140 -#define UNPACK_SEQUENCE_ADAPTIVE 141 -#define UNPACK_SEQUENCE_LIST 143 -#define UNPACK_SEQUENCE_TUPLE 150 -#define UNPACK_SEQUENCE_TWO_TUPLE 153 -#define LOAD_FAST__LOAD_FAST 154 -#define STORE_FAST__LOAD_FAST 158 -#define LOAD_FAST__LOAD_CONST 159 -#define LOAD_CONST__LOAD_FAST 161 -#define STORE_FAST__STORE_FAST 166 +#define BINARY_OP_ADAPTIVE 3 +#define BINARY_OP_ADD_INT 4 +#define BINARY_OP_ADD_FLOAT 5 +#define BINARY_OP_ADD_UNICODE 6 +#define BINARY_OP_INPLACE_ADD_UNICODE 7 +#define BINARY_OP_MULTIPLY_INT 8 +#define BINARY_OP_MULTIPLY_FLOAT 13 +#define BINARY_OP_SUBTRACT_INT 14 +#define BINARY_OP_SUBTRACT_FLOAT 16 +#define COMPARE_OP_ADAPTIVE 17 +#define COMPARE_OP_FLOAT_JUMP 18 +#define COMPARE_OP_INT_JUMP 19 +#define COMPARE_OP_STR_JUMP 20 +#define BINARY_SUBSCR_ADAPTIVE 21 +#define BINARY_SUBSCR_GETITEM 22 +#define BINARY_SUBSCR_LIST_INT 23 +#define BINARY_SUBSCR_TUPLE_INT 24 +#define BINARY_SUBSCR_DICT 26 +#define STORE_SUBSCR_ADAPTIVE 27 +#define STORE_SUBSCR_LIST_INT 28 +#define STORE_SUBSCR_DICT 29 +#define CALL_ADAPTIVE 34 +#define CALL_BUILTIN_CLASS 36 +#define CALL_NO_KW_BUILTIN_O 37 +#define CALL_NO_KW_BUILTIN_FAST 38 +#define CALL_BUILTIN_FAST_WITH_KEYWORDS 39 +#define CALL_NO_KW_LEN 40 +#define CALL_NO_KW_ISINSTANCE 41 +#define CALL_PY_EXACT_ARGS 42 +#define CALL_PY_WITH_DEFAULTS 43 +#define CALL_NO_KW_LIST_APPEND 44 +#define CALL_NO_KW_METHOD_DESCRIPTOR_O 45 +#define CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS 46 +#define CALL_NO_KW_STR_1 47 +#define CALL_NO_KW_TUPLE_1 48 +#define CALL_NO_KW_TYPE_1 55 +#define CALL_NO_KW_METHOD_DESCRIPTOR_FAST 56 +#define JUMP_ABSOLUTE_QUICK 57 +#define LOAD_ATTR_ADAPTIVE 58 +#define LOAD_ATTR_INSTANCE_VALUE 59 +#define LOAD_ATTR_WITH_HINT 62 +#define LOAD_ATTR_SLOT 63 +#define LOAD_ATTR_MODULE 64 +#define LOAD_GLOBAL_ADAPTIVE 65 +#define LOAD_GLOBAL_MODULE 66 +#define LOAD_GLOBAL_BUILTIN 67 +#define LOAD_METHOD_ADAPTIVE 72 +#define LOAD_METHOD_CACHED 76 +#define LOAD_METHOD_CLASS 77 +#define LOAD_METHOD_MODULE 78 +#define LOAD_METHOD_NO_DICT 79 +#define RESUME_QUICK 80 +#define STORE_ATTR_ADAPTIVE 81 +#define STORE_ATTR_INSTANCE_VALUE 131 +#define STORE_ATTR_SLOT 140 +#define STORE_ATTR_WITH_HINT 141 +#define UNPACK_SEQUENCE_ADAPTIVE 143 +#define UNPACK_SEQUENCE_LIST 150 +#define UNPACK_SEQUENCE_TUPLE 153 +#define UNPACK_SEQUENCE_TWO_TUPLE 154 +#define LOAD_FAST__LOAD_FAST 158 +#define STORE_FAST__LOAD_FAST 159 +#define LOAD_FAST__LOAD_CONST 161 +#define LOAD_CONST__LOAD_FAST 167 +#define STORE_FAST__STORE_FAST 168 #define DO_TRACING 255 #ifdef NEED_OPCODE_JUMP_TABLES static uint32_t _PyOpcode_RelativeJump[8] = { |
