mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
bpo-46675: Allow object value arrays and split key dictionaries larger than 16 (GH-31191)
This commit is contained in:
parent
328fe3fd20
commit
25db2b361b
6 changed files with 90 additions and 50 deletions
|
@ -3536,14 +3536,13 @@ handle_eval_breaker:
|
|||
PyDictValues *values = *_PyObject_ValuesPointer(owner);
|
||||
DEOPT_IF(values == NULL, STORE_ATTR);
|
||||
STAT_INC(STORE_ATTR, hit);
|
||||
int index = cache0->index;
|
||||
Py_ssize_t index = cache0->index;
|
||||
STACK_SHRINK(1);
|
||||
PyObject *value = POP();
|
||||
PyObject *old_value = values->values[index];
|
||||
values->values[index] = value;
|
||||
if (old_value == NULL) {
|
||||
assert(index < 16);
|
||||
values->mv_order = (values->mv_order << 4) | index;
|
||||
_PyDictValues_AddToInsertionOrder(values, index);
|
||||
}
|
||||
else {
|
||||
Py_DECREF(old_value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue