mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-102859: Remove JUMP_IF_FALSE_OR_POP and JUMP_IF_TRUE_OR_POP (#102870)
This commit is contained in:
parent
04adf2df39
commit
3468c768ce
15 changed files with 235 additions and 437 deletions
22
Include/internal/pycore_opcode.h
generated
22
Include/internal/pycore_opcode.h
generated
|
@ -21,7 +21,7 @@ static const uint32_t _PyOpcode_RelativeJump[9] = {
|
|||
0U,
|
||||
0U,
|
||||
536870912U,
|
||||
135118848U,
|
||||
135020544U,
|
||||
4163U,
|
||||
0U,
|
||||
0U,
|
||||
|
@ -32,7 +32,7 @@ static const uint32_t _PyOpcode_Jump[9] = {
|
|||
0U,
|
||||
0U,
|
||||
536870912U,
|
||||
135118848U,
|
||||
135020544U,
|
||||
4163U,
|
||||
0U,
|
||||
0U,
|
||||
|
@ -143,8 +143,6 @@ const uint8_t _PyOpcode_Deopt[256] = {
|
|||
[JUMP_BACKWARD] = JUMP_BACKWARD,
|
||||
[JUMP_BACKWARD_NO_INTERRUPT] = JUMP_BACKWARD_NO_INTERRUPT,
|
||||
[JUMP_FORWARD] = JUMP_FORWARD,
|
||||
[JUMP_IF_FALSE_OR_POP] = JUMP_IF_FALSE_OR_POP,
|
||||
[JUMP_IF_TRUE_OR_POP] = JUMP_IF_TRUE_OR_POP,
|
||||
[KW_NAMES] = KW_NAMES,
|
||||
[LIST_APPEND] = LIST_APPEND,
|
||||
[LIST_EXTEND] = LIST_EXTEND,
|
||||
|
@ -342,9 +340,9 @@ static const char *const _PyOpcode_OpName[263] = {
|
|||
[IMPORT_NAME] = "IMPORT_NAME",
|
||||
[IMPORT_FROM] = "IMPORT_FROM",
|
||||
[JUMP_FORWARD] = "JUMP_FORWARD",
|
||||
[JUMP_IF_FALSE_OR_POP] = "JUMP_IF_FALSE_OR_POP",
|
||||
[JUMP_IF_TRUE_OR_POP] = "JUMP_IF_TRUE_OR_POP",
|
||||
[STORE_FAST__LOAD_FAST] = "STORE_FAST__LOAD_FAST",
|
||||
[STORE_FAST__STORE_FAST] = "STORE_FAST__STORE_FAST",
|
||||
[STORE_SUBSCR_DICT] = "STORE_SUBSCR_DICT",
|
||||
[POP_JUMP_IF_FALSE] = "POP_JUMP_IF_FALSE",
|
||||
[POP_JUMP_IF_TRUE] = "POP_JUMP_IF_TRUE",
|
||||
[LOAD_GLOBAL] = "LOAD_GLOBAL",
|
||||
|
@ -374,7 +372,7 @@ static const char *const _PyOpcode_OpName[263] = {
|
|||
[JUMP_BACKWARD] = "JUMP_BACKWARD",
|
||||
[COMPARE_AND_BRANCH] = "COMPARE_AND_BRANCH",
|
||||
[CALL_FUNCTION_EX] = "CALL_FUNCTION_EX",
|
||||
[STORE_FAST__STORE_FAST] = "STORE_FAST__STORE_FAST",
|
||||
[STORE_SUBSCR_LIST_INT] = "STORE_SUBSCR_LIST_INT",
|
||||
[EXTENDED_ARG] = "EXTENDED_ARG",
|
||||
[LIST_APPEND] = "LIST_APPEND",
|
||||
[SET_ADD] = "SET_ADD",
|
||||
|
@ -384,15 +382,15 @@ static const char *const _PyOpcode_OpName[263] = {
|
|||
[YIELD_VALUE] = "YIELD_VALUE",
|
||||
[RESUME] = "RESUME",
|
||||
[MATCH_CLASS] = "MATCH_CLASS",
|
||||
[STORE_SUBSCR_DICT] = "STORE_SUBSCR_DICT",
|
||||
[STORE_SUBSCR_LIST_INT] = "STORE_SUBSCR_LIST_INT",
|
||||
[UNPACK_SEQUENCE_LIST] = "UNPACK_SEQUENCE_LIST",
|
||||
[UNPACK_SEQUENCE_TUPLE] = "UNPACK_SEQUENCE_TUPLE",
|
||||
[FORMAT_VALUE] = "FORMAT_VALUE",
|
||||
[BUILD_CONST_KEY_MAP] = "BUILD_CONST_KEY_MAP",
|
||||
[BUILD_STRING] = "BUILD_STRING",
|
||||
[UNPACK_SEQUENCE_LIST] = "UNPACK_SEQUENCE_LIST",
|
||||
[UNPACK_SEQUENCE_TUPLE] = "UNPACK_SEQUENCE_TUPLE",
|
||||
[UNPACK_SEQUENCE_TWO_TUPLE] = "UNPACK_SEQUENCE_TWO_TUPLE",
|
||||
[SEND_GEN] = "SEND_GEN",
|
||||
[160] = "<160>",
|
||||
[161] = "<161>",
|
||||
[LIST_EXTEND] = "LIST_EXTEND",
|
||||
[SET_UPDATE] = "SET_UPDATE",
|
||||
[DICT_MERGE] = "DICT_MERGE",
|
||||
|
@ -498,6 +496,8 @@ static const char *const _PyOpcode_OpName[263] = {
|
|||
#endif
|
||||
|
||||
#define EXTRA_CASES \
|
||||
case 160: \
|
||||
case 161: \
|
||||
case 166: \
|
||||
case 167: \
|
||||
case 168: \
|
||||
|
|
18
Include/opcode.h
generated
18
Include/opcode.h
generated
|
@ -66,8 +66,6 @@ extern "C" {
|
|||
#define IMPORT_NAME 108
|
||||
#define IMPORT_FROM 109
|
||||
#define JUMP_FORWARD 110
|
||||
#define JUMP_IF_FALSE_OR_POP 111
|
||||
#define JUMP_IF_TRUE_OR_POP 112
|
||||
#define POP_JUMP_IF_FALSE 114
|
||||
#define POP_JUMP_IF_TRUE 115
|
||||
#define LOAD_GLOBAL 116
|
||||
|
@ -180,14 +178,14 @@ extern "C" {
|
|||
#define STORE_ATTR_INSTANCE_VALUE 86
|
||||
#define STORE_ATTR_SLOT 87
|
||||
#define STORE_ATTR_WITH_HINT 88
|
||||
#define STORE_FAST__LOAD_FAST 113
|
||||
#define STORE_FAST__STORE_FAST 143
|
||||
#define STORE_SUBSCR_DICT 153
|
||||
#define STORE_SUBSCR_LIST_INT 154
|
||||
#define UNPACK_SEQUENCE_LIST 158
|
||||
#define UNPACK_SEQUENCE_TUPLE 159
|
||||
#define UNPACK_SEQUENCE_TWO_TUPLE 160
|
||||
#define SEND_GEN 161
|
||||
#define STORE_FAST__LOAD_FAST 111
|
||||
#define STORE_FAST__STORE_FAST 112
|
||||
#define STORE_SUBSCR_DICT 113
|
||||
#define STORE_SUBSCR_LIST_INT 143
|
||||
#define UNPACK_SEQUENCE_LIST 153
|
||||
#define UNPACK_SEQUENCE_TUPLE 154
|
||||
#define UNPACK_SEQUENCE_TWO_TUPLE 158
|
||||
#define SEND_GEN 159
|
||||
#define DO_TRACING 255
|
||||
|
||||
#define HAS_ARG(op) ((((op) >= HAVE_ARGUMENT) && (!IS_PSEUDO_OPCODE(op)))\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue