diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2025-02-07 17:52:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-07 17:52:49 (GMT) |
commit | 70e387c990c98d0fba9f2518061713809cff2f53 (patch) | |
tree | 98cbfef2eabfa0145208f725102da88aa5e9e1af /Python/optimizer_bytecodes.c | |
parent | fbaa6c8ff06cf885d9b8c8ea6cf25bab3781a2bd (diff) | |
download | cpython-70e387c990c98d0fba9f2518061713809cff2f53.zip cpython-70e387c990c98d0fba9f2518061713809cff2f53.tar.gz cpython-70e387c990c98d0fba9f2518061713809cff2f53.tar.bz2 |
GH-129709: Clean up tier two (GH-129710)
Diffstat (limited to 'Python/optimizer_bytecodes.c')
-rw-r--r-- | Python/optimizer_bytecodes.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index 91573e8..09f1915 100644 --- a/Python/optimizer_bytecodes.c +++ b/Python/optimizer_bytecodes.c @@ -385,9 +385,6 @@ dummy_func(void) { } op(_BINARY_SUBSCR_INIT_CALL, (container, sub, getitem -- new_frame: _Py_UOpsAbstractFrame *)) { - (void)container; - (void)sub; - (void)getitem; new_frame = NULL; ctx->done = true; } @@ -434,8 +431,6 @@ dummy_func(void) { } op(_COMPARE_OP, (left, right -- res)) { - (void)left; - (void)right; if (oparg & 16) { res = sym_new_type(ctx, &PyBool_Type); } @@ -445,32 +440,22 @@ dummy_func(void) { } op(_COMPARE_OP_INT, (left, right -- res)) { - (void)left; - (void)right; res = sym_new_type(ctx, &PyBool_Type); } op(_COMPARE_OP_FLOAT, (left, right -- res)) { - (void)left; - (void)right; res = sym_new_type(ctx, &PyBool_Type); } op(_COMPARE_OP_STR, (left, right -- res)) { - (void)left; - (void)right; res = sym_new_type(ctx, &PyBool_Type); } op(_IS_OP, (left, right -- res)) { - (void)left; - (void)right; res = sym_new_type(ctx, &PyBool_Type); } op(_CONTAINS_OP, (left, right -- res)) { - (void)left; - (void)right; res = sym_new_type(ctx, &PyBool_Type); } @@ -522,7 +507,6 @@ dummy_func(void) { op(_LOAD_ATTR_INSTANCE_VALUE, (offset/1, owner -- attr)) { attr = sym_new_not_null(ctx); (void)offset; - (void)owner; } op(_CHECK_ATTR_MODULE_PUSH_KEYS, (dict_version/2, owner -- owner, mod_keys)) { @@ -583,26 +567,21 @@ dummy_func(void) { op(_CHECK_ATTR_WITH_HINT, (owner -- owner, dict)) { dict = sym_new_not_null(ctx); - (void)owner; } op(_LOAD_ATTR_WITH_HINT, (hint/1, owner, dict -- attr)) { attr = sym_new_not_null(ctx); (void)hint; - (void)owner; - (void)dict; } op(_LOAD_ATTR_SLOT, (index/1, owner -- attr)) { attr = sym_new_not_null(ctx); (void)index; - (void)owner; } op(_LOAD_ATTR_CLASS, (descr/4, owner -- attr)) { attr = sym_new_not_null(ctx); (void)descr; - (void)owner; } op(_LOAD_ATTR_METHOD_WITH_VALUES, (descr/4, owner -- attr, self)) { @@ -625,19 +604,16 @@ dummy_func(void) { op(_LOAD_ATTR_PROPERTY_FRAME, (fget/4, owner -- new_frame: _Py_UOpsAbstractFrame *)) { (void)fget; - (void)owner; new_frame = NULL; ctx->done = true; } op(_INIT_CALL_BOUND_METHOD_EXACT_ARGS, (callable[1], self_or_null[1], unused[oparg] -- callable[1], self_or_null[1], unused[oparg])) { - (void)callable; callable[0] = sym_new_not_null(ctx); self_or_null[0] = sym_new_not_null(ctx); } op(_CHECK_FUNCTION_VERSION, (func_version/2, callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) { - (void)self_or_null; if (sym_is_const(callable) && sym_matches_type(callable, &PyFunction_Type)) { assert(PyFunction_Check(sym_get_const(callable))); REPLACE_OP(this_instr, _CHECK_FUNCTION_VERSION_INLINE, 0, func_version); @@ -657,7 +633,6 @@ dummy_func(void) { } } } - (void)self_or_null; } op(_CHECK_CALL_BOUND_METHOD_EXACT_ARGS, (callable, null, unused[oparg] -- callable, null, unused[oparg])) { @@ -667,7 +642,6 @@ dummy_func(void) { op(_INIT_CALL_PY_EXACT_ARGS, (callable, self_or_null, args[oparg] -- new_frame: _Py_UOpsAbstractFrame *)) { int argcount = oparg; - (void)callable; PyCodeObject *co = NULL; assert((this_instr + 2)->opcode == _PUSH_FRAME); @@ -695,16 +669,12 @@ dummy_func(void) { } op(_MAYBE_EXPAND_METHOD, (callable, self_or_null, args[oparg] -- func, maybe_self, args[oparg])) { - (void)callable; - (void)self_or_null; (void)args; func = sym_new_not_null(ctx); maybe_self = sym_new_not_null(ctx); } op(_PY_FRAME_GENERAL, (callable, self_or_null, args[oparg] -- new_frame: _Py_UOpsAbstractFrame *)) { - (void)(self_or_null); - (void)(callable); PyCodeObject *co = NULL; assert((this_instr + 2)->opcode == _PUSH_FRAME); co = get_code_with_logging((this_instr + 2)); @@ -717,27 +687,18 @@ dummy_func(void) { } op(_PY_FRAME_KW, (callable, self_or_null, args[oparg], kwnames -- new_frame: _Py_UOpsAbstractFrame *)) { - (void)callable; - (void)self_or_null; - (void)args; - (void)kwnames; new_frame = NULL; ctx->done = true; } op(_CHECK_AND_ALLOCATE_OBJECT, (type_version/2, callable, null, args[oparg] -- self, init, args[oparg])) { (void)type_version; - (void)callable; - (void)null; (void)args; self = sym_new_not_null(ctx); init = sym_new_not_null(ctx); } op(_CREATE_INIT_FRAME, (self, init, args[oparg] -- init_frame: _Py_UOpsAbstractFrame *)) { - (void)self; - (void)init; - (void)args; init_frame = NULL; ctx->done = true; } @@ -806,7 +767,7 @@ dummy_func(void) { corresponding_check_stack = this_instr; } - op (_CHECK_STACK_SPACE_OPERAND, ( -- )) { + op (_CHECK_STACK_SPACE_OPERAND, (framesize/2 -- )) { (void)framesize; /* We should never see _CHECK_STACK_SPACE_OPERANDs. * They are only created at the end of this pass. */ @@ -848,7 +809,6 @@ dummy_func(void) { op(_UNPACK_SEQUENCE, (seq -- values[oparg])) { /* This has to be done manually */ - (void)seq; for (int i = 0; i < oparg; i++) { values[i] = sym_new_unknown(ctx); } @@ -856,7 +816,6 @@ dummy_func(void) { op(_UNPACK_EX, (seq -- values[oparg & 0xFF], unused, unused[oparg >> 8])) { /* This has to be done manually */ - (void)seq; int totalargs = (oparg & 0xFF) + (oparg >> 8) + 1; for (int i = 0; i < totalargs; i++) { values[i] = sym_new_unknown(ctx); @@ -865,7 +824,6 @@ dummy_func(void) { op(_ITER_NEXT_RANGE, (iter -- iter, next)) { next = sym_new_type(ctx, &PyLong_Type); - (void)iter; } op(_GUARD_IS_TRUE_POP, (flag -- )) { @@ -917,7 +875,6 @@ dummy_func(void) { } op(_LOAD_SPECIAL, (owner -- attr, self_or_null)) { - (void)owner; attr = sym_new_not_null(ctx); self_or_null = sym_new_unknown(ctx); } |