mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-134584: Eliminate redundant refcounting from _STORE_SUBSCR_LIST_INT (gh-142703)
This commit is contained in:
parent
af7cca3c39
commit
04da416e6b
9 changed files with 96 additions and 21 deletions
|
|
@ -1126,9 +1126,9 @@ dummy_func(
|
|||
macro(STORE_SUBSCR) = _SPECIALIZE_STORE_SUBSCR + _STORE_SUBSCR;
|
||||
|
||||
macro(STORE_SUBSCR_LIST_INT) =
|
||||
_GUARD_TOS_INT + _GUARD_NOS_LIST + unused/1 + _STORE_SUBSCR_LIST_INT;
|
||||
_GUARD_TOS_INT + _GUARD_NOS_LIST + unused/1 + _STORE_SUBSCR_LIST_INT + _POP_TOP_INT + POP_TOP;
|
||||
|
||||
op(_STORE_SUBSCR_LIST_INT, (value, list_st, sub_st -- )) {
|
||||
op(_STORE_SUBSCR_LIST_INT, (value, list_st, sub_st -- ls, ss)) {
|
||||
PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st);
|
||||
PyObject *list = PyStackRef_AsPyObjectBorrow(list_st);
|
||||
|
||||
|
|
@ -1151,9 +1151,9 @@ dummy_func(
|
|||
PyStackRef_AsPyObjectSteal(value));
|
||||
assert(old_value != NULL);
|
||||
UNLOCK_OBJECT(list); // unlock before decrefs!
|
||||
PyStackRef_CLOSE_SPECIALIZED(sub_st, _PyLong_ExactDealloc);
|
||||
DEAD(sub_st);
|
||||
PyStackRef_CLOSE(list_st);
|
||||
INPUTS_DEAD();
|
||||
ls = list_st;
|
||||
ss = sub_st;
|
||||
Py_DECREF(old_value);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue