]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44032: Move data stack to thread from FrameObject. (GH-26076)
authorMark Shannon <mark@hotpy.org>
Fri, 21 May 2021 09:57:35 +0000 (10:57 +0100)
committerGitHub <noreply@github.com>
Fri, 21 May 2021 09:57:35 +0000 (10:57 +0100)
commitb11a951f16f0603d98de24fee5c023df83ea552c
tree82e7807515db0e284d9ebc3b8c3ba6ff08699ea5
parentbe4dd7fcd93ed29d362c4bbcc48151bc619d6595
bpo-44032: Move data stack to thread from FrameObject. (GH-26076)

* Remove 'zombie' frames. We won't need them once we are allocating fixed-size frames.

* Add co_nlocalplus field to code object to avoid recomputing size of locals + frees + cells.

* Move locals, cells and freevars out of frame object into separate memory buffer.

* Use per-threadstate allocated memory chunks for local variables.

* Move globals and builtins from frame object to per-thread stack.

* Move (slow) locals frame object to per-thread stack.

* Move internal frame functions to internal header.
20 files changed:
Include/cpython/code.h
Include/cpython/frameobject.h
Include/cpython/pystate.h
Include/genobject.h
Include/internal/pycore_frame.h [new file with mode: 0644]
Include/internal/pycore_pymem.h
Include/internal/pycore_pystate.h
Lib/test/test_gdb.py
Lib/test/test_sys.py
Misc/NEWS.d/next/Core and Builtins/2021-05-14-20-03-32.bpo-44032.OzT1ob.rst [new file with mode: 0644]
Objects/codeobject.c
Objects/frameobject.c
Objects/genobject.c
Objects/obmalloc.c
Objects/typeobject.c
Python/_warnings.c
Python/ceval.c
Python/pystate.c
Python/suggestions.c
Tools/gdb/libpython.py