mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
GH-100982: Break up COMPARE_AND_BRANCH (GH-102801)
This commit is contained in:
parent
bd063756b3
commit
0444ae2487
18 changed files with 377 additions and 479 deletions
|
|
@ -234,7 +234,7 @@ extern void _Py_Specialize_Call(PyObject *callable, _Py_CODEUNIT *instr,
|
|||
int nargs, PyObject *kwnames);
|
||||
extern void _Py_Specialize_BinaryOp(PyObject *lhs, PyObject *rhs, _Py_CODEUNIT *instr,
|
||||
int oparg, PyObject **locals);
|
||||
extern void _Py_Specialize_CompareAndBranch(PyObject *lhs, PyObject *rhs,
|
||||
extern void _Py_Specialize_CompareOp(PyObject *lhs, PyObject *rhs,
|
||||
_Py_CODEUNIT *instr, int oparg);
|
||||
extern void _Py_Specialize_UnpackSequence(PyObject *seq, _Py_CODEUNIT *instr,
|
||||
int oparg);
|
||||
|
|
|
|||
23
Include/internal/pycore_opcode.h
generated
23
Include/internal/pycore_opcode.h
generated
|
|
@ -51,7 +51,6 @@ const uint8_t _PyOpcode_Caches[256] = {
|
|||
[LOAD_GLOBAL] = 4,
|
||||
[BINARY_OP] = 1,
|
||||
[SEND] = 1,
|
||||
[COMPARE_AND_BRANCH] = 1,
|
||||
[CALL] = 4,
|
||||
};
|
||||
|
||||
|
|
@ -105,11 +104,10 @@ const uint8_t _PyOpcode_Deopt[256] = {
|
|||
[CHECK_EG_MATCH] = CHECK_EG_MATCH,
|
||||
[CHECK_EXC_MATCH] = CHECK_EXC_MATCH,
|
||||
[CLEANUP_THROW] = CLEANUP_THROW,
|
||||
[COMPARE_AND_BRANCH] = COMPARE_AND_BRANCH,
|
||||
[COMPARE_AND_BRANCH_FLOAT] = COMPARE_AND_BRANCH,
|
||||
[COMPARE_AND_BRANCH_INT] = COMPARE_AND_BRANCH,
|
||||
[COMPARE_AND_BRANCH_STR] = COMPARE_AND_BRANCH,
|
||||
[COMPARE_OP] = COMPARE_OP,
|
||||
[COMPARE_OP_FLOAT] = COMPARE_OP,
|
||||
[COMPARE_OP_INT] = COMPARE_OP,
|
||||
[COMPARE_OP_STR] = COMPARE_OP,
|
||||
[CONTAINS_OP] = CONTAINS_OP,
|
||||
[COPY] = COPY,
|
||||
[COPY_FREE_VARS] = COPY_FREE_VARS,
|
||||
|
|
@ -277,7 +275,7 @@ static const char *const _PyOpcode_OpName[263] = {
|
|||
[CALL_NO_KW_STR_1] = "CALL_NO_KW_STR_1",
|
||||
[CALL_NO_KW_TUPLE_1] = "CALL_NO_KW_TUPLE_1",
|
||||
[CALL_NO_KW_TYPE_1] = "CALL_NO_KW_TYPE_1",
|
||||
[COMPARE_AND_BRANCH_FLOAT] = "COMPARE_AND_BRANCH_FLOAT",
|
||||
[COMPARE_OP_FLOAT] = "COMPARE_OP_FLOAT",
|
||||
[WITH_EXCEPT_START] = "WITH_EXCEPT_START",
|
||||
[GET_AITER] = "GET_AITER",
|
||||
[GET_ANEXT] = "GET_ANEXT",
|
||||
|
|
@ -285,8 +283,8 @@ static const char *const _PyOpcode_OpName[263] = {
|
|||
[BEFORE_WITH] = "BEFORE_WITH",
|
||||
[END_ASYNC_FOR] = "END_ASYNC_FOR",
|
||||
[CLEANUP_THROW] = "CLEANUP_THROW",
|
||||
[COMPARE_AND_BRANCH_INT] = "COMPARE_AND_BRANCH_INT",
|
||||
[COMPARE_AND_BRANCH_STR] = "COMPARE_AND_BRANCH_STR",
|
||||
[COMPARE_OP_INT] = "COMPARE_OP_INT",
|
||||
[COMPARE_OP_STR] = "COMPARE_OP_STR",
|
||||
[FOR_ITER_LIST] = "FOR_ITER_LIST",
|
||||
[FOR_ITER_TUPLE] = "FOR_ITER_TUPLE",
|
||||
[STORE_SUBSCR] = "STORE_SUBSCR",
|
||||
|
|
@ -370,9 +368,9 @@ static const char *const _PyOpcode_OpName[263] = {
|
|||
[STORE_DEREF] = "STORE_DEREF",
|
||||
[DELETE_DEREF] = "DELETE_DEREF",
|
||||
[JUMP_BACKWARD] = "JUMP_BACKWARD",
|
||||
[COMPARE_AND_BRANCH] = "COMPARE_AND_BRANCH",
|
||||
[CALL_FUNCTION_EX] = "CALL_FUNCTION_EX",
|
||||
[STORE_SUBSCR_LIST_INT] = "STORE_SUBSCR_LIST_INT",
|
||||
[CALL_FUNCTION_EX] = "CALL_FUNCTION_EX",
|
||||
[UNPACK_SEQUENCE_LIST] = "UNPACK_SEQUENCE_LIST",
|
||||
[EXTENDED_ARG] = "EXTENDED_ARG",
|
||||
[LIST_APPEND] = "LIST_APPEND",
|
||||
[SET_ADD] = "SET_ADD",
|
||||
|
|
@ -382,13 +380,13 @@ static const char *const _PyOpcode_OpName[263] = {
|
|||
[YIELD_VALUE] = "YIELD_VALUE",
|
||||
[RESUME] = "RESUME",
|
||||
[MATCH_CLASS] = "MATCH_CLASS",
|
||||
[UNPACK_SEQUENCE_LIST] = "UNPACK_SEQUENCE_LIST",
|
||||
[UNPACK_SEQUENCE_TUPLE] = "UNPACK_SEQUENCE_TUPLE",
|
||||
[UNPACK_SEQUENCE_TWO_TUPLE] = "UNPACK_SEQUENCE_TWO_TUPLE",
|
||||
[FORMAT_VALUE] = "FORMAT_VALUE",
|
||||
[BUILD_CONST_KEY_MAP] = "BUILD_CONST_KEY_MAP",
|
||||
[BUILD_STRING] = "BUILD_STRING",
|
||||
[UNPACK_SEQUENCE_TWO_TUPLE] = "UNPACK_SEQUENCE_TWO_TUPLE",
|
||||
[SEND_GEN] = "SEND_GEN",
|
||||
[159] = "<159>",
|
||||
[160] = "<160>",
|
||||
[161] = "<161>",
|
||||
[LIST_EXTEND] = "LIST_EXTEND",
|
||||
|
|
@ -496,6 +494,7 @@ static const char *const _PyOpcode_OpName[263] = {
|
|||
#endif
|
||||
|
||||
#define EXTRA_CASES \
|
||||
case 159: \
|
||||
case 160: \
|
||||
case 161: \
|
||||
case 166: \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue