mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
GH-115685: Split _TO_BOOL_ALWAYS_TRUE into micro-ops (GH-116352)
This commit is contained in:
parent
0c81ce1360
commit
23db9c6227
8 changed files with 50 additions and 44 deletions
2
Include/internal/pycore_opcode_metadata.h
generated
2
Include/internal/pycore_opcode_metadata.h
generated
|
|
@ -1320,7 +1320,7 @@ _PyOpcode_macro_expansion[256] = {
|
|||
[STORE_SUBSCR_LIST_INT] = { .nuops = 1, .uops = { { _STORE_SUBSCR_LIST_INT, 0, 0 } } },
|
||||
[SWAP] = { .nuops = 1, .uops = { { _SWAP, 0, 0 } } },
|
||||
[TO_BOOL] = { .nuops = 1, .uops = { { _TO_BOOL, 0, 0 } } },
|
||||
[TO_BOOL_ALWAYS_TRUE] = { .nuops = 1, .uops = { { _TO_BOOL_ALWAYS_TRUE, 2, 1 } } },
|
||||
[TO_BOOL_ALWAYS_TRUE] = { .nuops = 2, .uops = { { _GUARD_TYPE_VERSION, 2, 1 }, { _REPLACE_WITH_TRUE, 0, 0 } } },
|
||||
[TO_BOOL_BOOL] = { .nuops = 1, .uops = { { _TO_BOOL_BOOL, 0, 0 } } },
|
||||
[TO_BOOL_INT] = { .nuops = 1, .uops = { { _TO_BOOL_INT, 0, 0 } } },
|
||||
[TO_BOOL_LIST] = { .nuops = 1, .uops = { { _TO_BOOL_LIST, 0, 0 } } },
|
||||
|
|
|
|||
40
Include/internal/pycore_uop_ids.h
generated
40
Include/internal/pycore_uop_ids.h
generated
|
|
@ -220,40 +220,40 @@ extern "C" {
|
|||
#define _PUSH_EXC_INFO PUSH_EXC_INFO
|
||||
#define _PUSH_FRAME 405
|
||||
#define _PUSH_NULL PUSH_NULL
|
||||
#define _REPLACE_WITH_TRUE 406
|
||||
#define _RESUME_CHECK RESUME_CHECK
|
||||
#define _SAVE_RETURN_OFFSET 406
|
||||
#define _SEND 407
|
||||
#define _SAVE_RETURN_OFFSET 407
|
||||
#define _SEND 408
|
||||
#define _SEND_GEN SEND_GEN
|
||||
#define _SETUP_ANNOTATIONS SETUP_ANNOTATIONS
|
||||
#define _SET_ADD SET_ADD
|
||||
#define _SET_FUNCTION_ATTRIBUTE SET_FUNCTION_ATTRIBUTE
|
||||
#define _SET_UPDATE SET_UPDATE
|
||||
#define _START_EXECUTOR 408
|
||||
#define _STORE_ATTR 409
|
||||
#define _STORE_ATTR_INSTANCE_VALUE 410
|
||||
#define _STORE_ATTR_SLOT 411
|
||||
#define _START_EXECUTOR 409
|
||||
#define _STORE_ATTR 410
|
||||
#define _STORE_ATTR_INSTANCE_VALUE 411
|
||||
#define _STORE_ATTR_SLOT 412
|
||||
#define _STORE_ATTR_WITH_HINT STORE_ATTR_WITH_HINT
|
||||
#define _STORE_DEREF STORE_DEREF
|
||||
#define _STORE_FAST 412
|
||||
#define _STORE_FAST_0 413
|
||||
#define _STORE_FAST_1 414
|
||||
#define _STORE_FAST_2 415
|
||||
#define _STORE_FAST_3 416
|
||||
#define _STORE_FAST_4 417
|
||||
#define _STORE_FAST_5 418
|
||||
#define _STORE_FAST_6 419
|
||||
#define _STORE_FAST_7 420
|
||||
#define _STORE_FAST 413
|
||||
#define _STORE_FAST_0 414
|
||||
#define _STORE_FAST_1 415
|
||||
#define _STORE_FAST_2 416
|
||||
#define _STORE_FAST_3 417
|
||||
#define _STORE_FAST_4 418
|
||||
#define _STORE_FAST_5 419
|
||||
#define _STORE_FAST_6 420
|
||||
#define _STORE_FAST_7 421
|
||||
#define _STORE_FAST_LOAD_FAST STORE_FAST_LOAD_FAST
|
||||
#define _STORE_FAST_STORE_FAST STORE_FAST_STORE_FAST
|
||||
#define _STORE_GLOBAL STORE_GLOBAL
|
||||
#define _STORE_NAME STORE_NAME
|
||||
#define _STORE_SLICE STORE_SLICE
|
||||
#define _STORE_SUBSCR 421
|
||||
#define _STORE_SUBSCR 422
|
||||
#define _STORE_SUBSCR_DICT STORE_SUBSCR_DICT
|
||||
#define _STORE_SUBSCR_LIST_INT STORE_SUBSCR_LIST_INT
|
||||
#define _SWAP SWAP
|
||||
#define _TO_BOOL 422
|
||||
#define _TO_BOOL_ALWAYS_TRUE TO_BOOL_ALWAYS_TRUE
|
||||
#define _TO_BOOL 423
|
||||
#define _TO_BOOL_BOOL TO_BOOL_BOOL
|
||||
#define _TO_BOOL_INT TO_BOOL_INT
|
||||
#define _TO_BOOL_LIST TO_BOOL_LIST
|
||||
|
|
@ -263,12 +263,12 @@ extern "C" {
|
|||
#define _UNARY_NEGATIVE UNARY_NEGATIVE
|
||||
#define _UNARY_NOT UNARY_NOT
|
||||
#define _UNPACK_EX UNPACK_EX
|
||||
#define _UNPACK_SEQUENCE 423
|
||||
#define _UNPACK_SEQUENCE 424
|
||||
#define _UNPACK_SEQUENCE_LIST UNPACK_SEQUENCE_LIST
|
||||
#define _UNPACK_SEQUENCE_TUPLE UNPACK_SEQUENCE_TUPLE
|
||||
#define _UNPACK_SEQUENCE_TWO_TUPLE UNPACK_SEQUENCE_TWO_TUPLE
|
||||
#define _WITH_EXCEPT_START WITH_EXCEPT_START
|
||||
#define MAX_UOP_ID 423
|
||||
#define MAX_UOP_ID 424
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
4
Include/internal/pycore_uop_metadata.h
generated
4
Include/internal/pycore_uop_metadata.h
generated
|
|
@ -54,7 +54,7 @@ const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = {
|
|||
[_TO_BOOL_LIST] = HAS_DEOPT_FLAG | HAS_EXIT_FLAG,
|
||||
[_TO_BOOL_NONE] = HAS_DEOPT_FLAG | HAS_EXIT_FLAG,
|
||||
[_TO_BOOL_STR] = HAS_DEOPT_FLAG | HAS_EXIT_FLAG,
|
||||
[_TO_BOOL_ALWAYS_TRUE] = HAS_DEOPT_FLAG | HAS_EXIT_FLAG,
|
||||
[_REPLACE_WITH_TRUE] = 0,
|
||||
[_UNARY_INVERT] = HAS_ERROR_FLAG | HAS_ESCAPES_FLAG,
|
||||
[_GUARD_BOTH_INT] = HAS_DEOPT_FLAG | HAS_EXIT_FLAG | HAS_PASSTHROUGH_FLAG,
|
||||
[_BINARY_OP_MULTIPLY_INT] = HAS_ERROR_FLAG | HAS_PURE_FLAG,
|
||||
|
|
@ -430,6 +430,7 @@ const char *const _PyOpcode_uop_name[MAX_UOP_ID+1] = {
|
|||
[_PUSH_EXC_INFO] = "_PUSH_EXC_INFO",
|
||||
[_PUSH_FRAME] = "_PUSH_FRAME",
|
||||
[_PUSH_NULL] = "_PUSH_NULL",
|
||||
[_REPLACE_WITH_TRUE] = "_REPLACE_WITH_TRUE",
|
||||
[_RESUME_CHECK] = "_RESUME_CHECK",
|
||||
[_SAVE_RETURN_OFFSET] = "_SAVE_RETURN_OFFSET",
|
||||
[_SETUP_ANNOTATIONS] = "_SETUP_ANNOTATIONS",
|
||||
|
|
@ -461,7 +462,6 @@ const char *const _PyOpcode_uop_name[MAX_UOP_ID+1] = {
|
|||
[_STORE_SUBSCR_LIST_INT] = "_STORE_SUBSCR_LIST_INT",
|
||||
[_SWAP] = "_SWAP",
|
||||
[_TO_BOOL] = "_TO_BOOL",
|
||||
[_TO_BOOL_ALWAYS_TRUE] = "_TO_BOOL_ALWAYS_TRUE",
|
||||
[_TO_BOOL_BOOL] = "_TO_BOOL_BOOL",
|
||||
[_TO_BOOL_INT] = "_TO_BOOL_INT",
|
||||
[_TO_BOOL_LIST] = "_TO_BOOL_LIST",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue