mirror of
https://github.com/python/cpython.git
synced 2025-12-31 12:33:28 +00:00
GH-134584: Remove redundant refcount from _STORE_ATTR_SLOT (#142729)
This commit is contained in:
parent
f277781bba
commit
bef63d2fb8
9 changed files with 70 additions and 17 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue