diff options
author | mpage <mpage@meta.com> | 2025-01-14 19:56:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-14 19:56:11 (GMT) |
commit | b5ee0258bf5bb60a5a5a65c64717853e06b64808 (patch) | |
tree | f5f7dd71e3fbed86e867f454c742dd34040f7129 /Python/optimizer_bytecodes.c | |
parent | 1c13c56a34fc4c4d8969f0b6dc93d5208a50d61b (diff) | |
download | cpython-b5ee0258bf5bb60a5a5a65c64717853e06b64808.zip cpython-b5ee0258bf5bb60a5a5a65c64717853e06b64808.tar.gz cpython-b5ee0258bf5bb60a5a5a65c64717853e06b64808.tar.bz2 |
gh-115999: Specialize `LOAD_ATTR` for instance and class receivers in free-threaded builds (#128164)
Finish specialization for LOAD_ATTR in the free-threaded build by adding support for class and instance receivers.
Diffstat (limited to 'Python/optimizer_bytecodes.c')
-rw-r--r-- | Python/optimizer_bytecodes.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index 788adec..4d96ada 100644 --- a/Python/optimizer_bytecodes.c +++ b/Python/optimizer_bytecodes.c @@ -582,11 +582,17 @@ dummy_func(void) { } } - op(_LOAD_ATTR_WITH_HINT, (hint/1, owner -- attr, null if (oparg & 1))) { + 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, null if (oparg & 1))) { attr = sym_new_not_null(ctx); null = sym_new_null(ctx); (void)hint; (void)owner; + (void)dict; } op(_LOAD_ATTR_SLOT, (index/1, owner -- attr, null if (oparg & 1))) { |