mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
GH-122160: Remove BUILD_CONST_KEY_MAP opcode. (GH-122164)
This commit is contained in:
parent
9bb2e4623f
commit
2e14a52cce
16 changed files with 306 additions and 478 deletions
|
@ -1882,25 +1882,6 @@ dummy_func(
|
|||
}
|
||||
}
|
||||
|
||||
inst(BUILD_CONST_KEY_MAP, (values[oparg], keys -- map)) {
|
||||
PyObject *keys_o = PyStackRef_AsPyObjectBorrow(keys);
|
||||
|
||||
assert(PyTuple_CheckExact(keys_o));
|
||||
assert(PyTuple_GET_SIZE(keys_o) == (Py_ssize_t)oparg);
|
||||
STACKREFS_TO_PYOBJECTS(values, oparg, values_o);
|
||||
if (CONVERSION_FAILED(values_o)) {
|
||||
DECREF_INPUTS();
|
||||
ERROR_IF(true, error);
|
||||
}
|
||||
PyObject *map_o = _PyDict_FromItems(
|
||||
&PyTuple_GET_ITEM(keys_o, 0), 1,
|
||||
values_o, 1, oparg);
|
||||
STACKREFS_TO_PYOBJECTS_CLEANUP(values_o);
|
||||
DECREF_INPUTS();
|
||||
ERROR_IF(map_o == NULL, error);
|
||||
map = PyStackRef_FromPyObjectSteal(map_o);
|
||||
}
|
||||
|
||||
inst(DICT_UPDATE, (dict, unused[oparg - 1], update -- dict, unused[oparg - 1])) {
|
||||
PyObject *dict_o = PyStackRef_AsPyObjectBorrow(dict);
|
||||
PyObject *update_o = PyStackRef_AsPyObjectBorrow(update);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue