mirror of
https://github.com/python/cpython.git
synced 2026-01-03 22:12:27 +00:00
gh-134584: Eliminate redundant refcounting from _BINARY_OP_SUBSCR_LIST_INT (GH-142926)
This commit is contained in:
parent
f54d44d333
commit
33d94abafd
9 changed files with 74 additions and 38 deletions
|
|
@ -893,9 +893,9 @@ dummy_func(
|
|||
macro(STORE_SLICE) = _SPECIALIZE_STORE_SLICE + _STORE_SLICE;
|
||||
|
||||
macro(BINARY_OP_SUBSCR_LIST_INT) =
|
||||
_GUARD_TOS_INT + _GUARD_NOS_LIST + unused/5 + _BINARY_OP_SUBSCR_LIST_INT;
|
||||
_GUARD_TOS_INT + _GUARD_NOS_LIST + unused/5 + _BINARY_OP_SUBSCR_LIST_INT + _POP_TOP_INT + POP_TOP;
|
||||
|
||||
op(_BINARY_OP_SUBSCR_LIST_INT, (list_st, sub_st -- res)) {
|
||||
op(_BINARY_OP_SUBSCR_LIST_INT, (list_st, sub_st -- res, ls, ss)) {
|
||||
PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st);
|
||||
PyObject *list = PyStackRef_AsPyObjectBorrow(list_st);
|
||||
|
||||
|
|
@ -918,7 +918,9 @@ dummy_func(
|
|||
res = PyStackRef_FromPyObjectNew(res_o);
|
||||
#endif
|
||||
STAT_INC(BINARY_OP, hit);
|
||||
DECREF_INPUTS();
|
||||
ls = list_st;
|
||||
ss = sub_st;
|
||||
INPUTS_DEAD();
|
||||
}
|
||||
|
||||
macro(BINARY_OP_SUBSCR_LIST_SLICE) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue