diff options
| author | Savannah Ostrowski <savannah@python.org> | 2025-12-15 23:18:44 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-15 23:18:44 (GMT) |
| commit | bef63d2fb81ae28760040157ea589541bed47d02 (patch) | |
| tree | df24d3b3f0dec554a2f43869ac12db1c9be1e262 /Python/bytecodes.c | |
| parent | f277781bba684322dffffe45cd878f4652ccf7e4 (diff) | |
| download | cpython-bef63d2fb81ae28760040157ea589541bed47d02.zip cpython-bef63d2fb81ae28760040157ea589541bed47d02.tar.gz cpython-bef63d2fb81ae28760040157ea589541bed47d02.tar.bz2 | |
GH-134584: Remove redundant refcount from `_STORE_ATTR_SLOT` (#142729)
Diffstat (limited to 'Python/bytecodes.c')
| -rw-r--r-- | Python/bytecodes.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 8420d09..0dbfe96 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -2640,7 +2640,7 @@ dummy_func( _GUARD_TYPE_VERSION + _STORE_ATTR_WITH_HINT; - op(_STORE_ATTR_SLOT, (index/1, value, owner --)) { + op(_STORE_ATTR_SLOT, (index/1, value, owner -- o)) { PyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); DEOPT_IF(!LOCK_OBJECT(owner_o)); @@ -2649,14 +2649,16 @@ dummy_func( PyObject *old_value = *(PyObject **)addr; FT_ATOMIC_STORE_PTR_RELEASE(*(PyObject **)addr, PyStackRef_AsPyObjectSteal(value)); UNLOCK_OBJECT(owner_o); - PyStackRef_CLOSE(owner); + INPUTS_DEAD(); + o = owner; Py_XDECREF(old_value); } macro(STORE_ATTR_SLOT) = unused/1 + _GUARD_TYPE_VERSION + - _STORE_ATTR_SLOT; + _STORE_ATTR_SLOT + + POP_TOP; family(COMPARE_OP, INLINE_CACHE_ENTRIES_COMPARE_OP) = { COMPARE_OP_FLOAT, |
