diff options
author | Ken Jin <kenjin@python.org> | 2024-02-23 07:42:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 07:42:03 (GMT) |
commit | a33ffe4785f90f68227ddf2ec3e06d5ceaf76cec (patch) | |
tree | 941f62dd34527cf4208ad9c319cc8f2fd7582d9e /Python/tier2_redundancy_eliminator_bytecodes.c | |
parent | a494a3dd8e0e74861972698c37b14a4087a4688c (diff) | |
download | cpython-a33ffe4785f90f68227ddf2ec3e06d5ceaf76cec.zip cpython-a33ffe4785f90f68227ddf2ec3e06d5ceaf76cec.tar.gz cpython-a33ffe4785f90f68227ddf2ec3e06d5ceaf76cec.tar.bz2 |
gh-114058: More robust method handling in redundancy eliminator (GH-115779)
Diffstat (limited to 'Python/tier2_redundancy_eliminator_bytecodes.c')
-rw-r--r-- | Python/tier2_redundancy_eliminator_bytecodes.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Python/tier2_redundancy_eliminator_bytecodes.c b/Python/tier2_redundancy_eliminator_bytecodes.c index ff2b9a4..ef7b43d 100644 --- a/Python/tier2_redundancy_eliminator_bytecodes.c +++ b/Python/tier2_redundancy_eliminator_bytecodes.c @@ -295,6 +295,27 @@ dummy_func(void) { (void)owner; } + op(_LOAD_ATTR_METHOD_WITH_VALUES, (descr/4, owner -- attr, self if (1))) { + OUT_OF_SPACE_IF_NULL(attr = sym_new_known_notnull(ctx)); + OUT_OF_SPACE_IF_NULL(self = sym_new_known_notnull(ctx)); + } + + op(_LOAD_ATTR_METHOD_NO_DICT, (descr/4, owner -- attr, self if (1))) { + OUT_OF_SPACE_IF_NULL(attr = sym_new_known_notnull(ctx)); + OUT_OF_SPACE_IF_NULL(self = sym_new_known_notnull(ctx)); + } + + op(_LOAD_ATTR_METHOD_LAZY_DICT, (descr/4, owner -- attr, self if (1))) { + OUT_OF_SPACE_IF_NULL(attr = sym_new_known_notnull(ctx)); + OUT_OF_SPACE_IF_NULL(self = sym_new_known_notnull(ctx)); + } + + op(_INIT_CALL_BOUND_METHOD_EXACT_ARGS, (callable, unused, unused[oparg] -- func, self, unused[oparg])) { + OUT_OF_SPACE_IF_NULL(func = sym_new_known_notnull(ctx)); + OUT_OF_SPACE_IF_NULL(self = sym_new_known_notnull(ctx)); + } + + op(_CHECK_FUNCTION_EXACT_ARGS, (func_version/2, callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) { sym_set_type(callable, &PyFunction_Type); (void)self_or_null; |