mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
GH-106485: Dematerialize instance dictionaries when possible (GH-106539)
This commit is contained in:
parent
a9caf9cf90
commit
326f0ba1c5
10 changed files with 88 additions and 24 deletions
6
Python/executor_cases.c.h
generated
6
Python/executor_cases.c.h
generated
|
@ -1623,8 +1623,10 @@
|
|||
owner = stack_pointer[-1];
|
||||
assert(Py_TYPE(owner)->tp_dictoffset < 0);
|
||||
assert(Py_TYPE(owner)->tp_flags & Py_TPFLAGS_MANAGED_DICT);
|
||||
PyDictOrValues dorv = *_PyObject_DictOrValuesPointer(owner);
|
||||
DEOPT_IF(!_PyDictOrValues_IsValues(dorv), LOAD_ATTR);
|
||||
PyDictOrValues *dorv = _PyObject_DictOrValuesPointer(owner);
|
||||
DEOPT_IF(!_PyDictOrValues_IsValues(*dorv) &&
|
||||
!_PyObject_MakeInstanceAttributesFromDict(owner, dorv),
|
||||
LOAD_ATTR);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue