mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-45340: Don't create object dictionaries unless actually needed (GH-28802)
* Never change types' cached keys. It could invalidate inline attribute objects. * Lazily create object dictionaries. * Update specialization of LOAD/STORE_ATTR. * Don't update shared keys version for deletion of value. * Update gdb support to handle instance values. * Rename SPLIT_KEYS opcodes to INSTANCE_VALUE.
This commit is contained in:
parent
97308dfcdc
commit
a8b9350964
18 changed files with 721 additions and 400 deletions
|
@ -181,6 +181,16 @@ extern int _Py_CheckSlotResult(
|
|||
extern PyObject* _PyType_AllocNoTrack(PyTypeObject *type, Py_ssize_t nitems);
|
||||
|
||||
extern int _PyObject_InitializeDict(PyObject *obj);
|
||||
extern int _PyObject_StoreInstanceAttribute(PyObject *obj, PyDictValues *values,
|
||||
PyObject *name, PyObject *value);
|
||||
PyObject * _PyObject_GetInstanceAttribute(PyObject *obj, PyDictValues *values,
|
||||
PyObject *name);
|
||||
PyDictValues ** _PyObject_ValuesPointer(PyObject *);
|
||||
PyObject ** _PyObject_DictPointer(PyObject *);
|
||||
int _PyObject_VisitInstanceAttributes(PyObject *self, visitproc visit, void *arg);
|
||||
void _PyObject_ClearInstanceAttributes(PyObject *self);
|
||||
void _PyObject_FreeInstanceAttributes(PyObject *self);
|
||||
int _PyObject_IsInstanceDictEmpty(PyObject *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue