]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45340: Don't create object dictionaries unless actually needed (GH-28802)
authorMark Shannon <mark@hotpy.org>
Wed, 13 Oct 2021 13:19:34 +0000 (14:19 +0100)
committerGitHub <noreply@github.com>
Wed, 13 Oct 2021 13:19:34 +0000 (14:19 +0100)
commita8b9350964f43cb648c98c179c8037fbf3ff8a7d
tree13a539432c9d48ac278d34d040f17a7a12eac771
parent97308dfcdc0696e0b116c37386e2ff4d72e6c3f4
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.
18 files changed:
Include/cpython/object.h
Include/internal/pycore_dict.h
Include/internal/pycore_object.h
Include/object.h
Include/opcode.h
Lib/opcode.py
Lib/test/test_descr.py
Lib/test/test_dict.py
Lib/test/test_gc.py
Lib/test/test_sys.py
Misc/NEWS.d/next/Core and Builtins/2021-10-08-09-47-38.bpo-45340.ukHgDb.rst [new file with mode: 0644]
Objects/dictobject.c
Objects/object.c
Objects/typeobject.c
Python/ceval.c
Python/opcode_targets.h
Python/specialize.c
Tools/gdb/libpython.py