mirror of
https://github.com/python/cpython.git
synced 2026-04-15 08:11:10 +00:00
gh-145866: Convert DICT_UPDATE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-146190)
This commit is contained in:
parent
8de70b31c5
commit
1516c26399
10 changed files with 1254 additions and 1223 deletions
|
|
@ -2382,7 +2382,7 @@ dummy_func(
|
|||
NOP,
|
||||
};
|
||||
|
||||
inst(DICT_UPDATE, (dict, unused[oparg - 1], update -- dict, unused[oparg - 1])) {
|
||||
op(_DICT_UPDATE, (dict, unused[oparg - 1], update -- dict, unused[oparg - 1], upd)) {
|
||||
PyObject *dict_o = PyStackRef_AsPyObjectBorrow(dict);
|
||||
PyObject *update_o = PyStackRef_AsPyObjectBorrow(update);
|
||||
|
||||
|
|
@ -2394,12 +2394,14 @@ dummy_func(
|
|||
"'%.200s' object is not a mapping",
|
||||
Py_TYPE(update_o)->tp_name);
|
||||
}
|
||||
PyStackRef_CLOSE(update);
|
||||
ERROR_IF(true);
|
||||
ERROR_NO_POP();
|
||||
}
|
||||
PyStackRef_CLOSE(update);
|
||||
upd = update;
|
||||
DEAD(update);
|
||||
}
|
||||
|
||||
macro(DICT_UPDATE) = _DICT_UPDATE + POP_TOP;
|
||||
|
||||
op(_DICT_MERGE, (callable, unused, unused, dict, unused[oparg - 1], update -- callable, unused, unused, dict, unused[oparg - 1], u)) {
|
||||
PyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable);
|
||||
PyObject *dict_o = PyStackRef_AsPyObjectBorrow(dict);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue