GH-134584: Remove redundant refcount from _STORE_ATTR_SLOT (#142729)

This commit is contained in:
Savannah Ostrowski 2025-12-15 15:18:44 -08:00 committed by GitHub
parent f277781bba
commit bef63d2fb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 70 additions and 17 deletions

View file

@ -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,