mirror of
https://github.com/python/cpython.git
synced 2026-01-20 06:10:27 +00:00
gh-134584: JIT: Remove redundant refcount for _BINARY_OP_SUBSCR_DICT (GH-143724)
This commit is contained in:
parent
42f7c2dfba
commit
054a565c64
9 changed files with 83 additions and 44 deletions
|
|
@ -1056,9 +1056,9 @@ dummy_func(
|
|||
}
|
||||
|
||||
macro(BINARY_OP_SUBSCR_DICT) =
|
||||
_GUARD_NOS_DICT + unused/5 + _BINARY_OP_SUBSCR_DICT;
|
||||
_GUARD_NOS_DICT + unused/5 + _BINARY_OP_SUBSCR_DICT + POP_TOP + POP_TOP;
|
||||
|
||||
op(_BINARY_OP_SUBSCR_DICT, (dict_st, sub_st -- res)) {
|
||||
op(_BINARY_OP_SUBSCR_DICT, (dict_st, sub_st -- res, ds, ss)) {
|
||||
PyObject *sub = PyStackRef_AsPyObjectBorrow(sub_st);
|
||||
PyObject *dict = PyStackRef_AsPyObjectBorrow(dict_st);
|
||||
|
||||
|
|
@ -1069,9 +1069,13 @@ dummy_func(
|
|||
if (rc == 0) {
|
||||
_PyErr_SetKeyError(sub);
|
||||
}
|
||||
DECREF_INPUTS();
|
||||
ERROR_IF(rc <= 0); // not found or error
|
||||
if (rc <= 0) {
|
||||
ERROR_NO_POP();
|
||||
}
|
||||
res = PyStackRef_FromPyObjectSteal(res_o);
|
||||
ds = dict_st;
|
||||
ss = sub_st;
|
||||
INPUTS_DEAD();
|
||||
}
|
||||
|
||||
op(_BINARY_OP_SUBSCR_CHECK_FUNC, (container, unused -- container, unused, getitem)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue