]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44525: Copy free variables in bytecode to allow calls to inner functions to be...
authorMark Shannon <mark@hotpy.org>
Tue, 23 Nov 2021 09:53:24 +0000 (09:53 +0000)
committerGitHub <noreply@github.com>
Tue, 23 Nov 2021 09:53:24 +0000 (09:53 +0000)
commit135cabd328504e1648d17242b42b675cdbd0193b
tree4efa5418b1816ba02c206678ecfa4e2d8e8d8f14
parentd82f2caf942fa8b94e797a2f116ee54ec303c2df
bpo-44525: Copy free variables in bytecode to allow calls to inner functions to be specialized (GH-29595)

* Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead.

* Add reference to function to frame, borrow references to builtins and globals.

* Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
25 files changed:
Doc/library/dis.rst
Include/cpython/funcobject.h
Include/internal/pycore_ceval.h
Include/internal/pycore_frame.h
Include/internal/pycore_function.h [new file with mode: 0644]
Include/opcode.h
Lib/importlib/_bootstrap_external.py
Lib/opcode.py
Lib/test/test_code.py
Lib/test/test_dis.py
Makefile.pre.in
Misc/NEWS.d/next/Core and Builtins/2021-11-18-10-02-02.bpo-44525.M4xwn_.rst [new file with mode: 0644]
Objects/call.c
Objects/frameobject.c
Objects/funcobject.c
Objects/genobject.c
Objects/typeobject.c
PCbuild/pythoncore.vcxproj
Python/bltinmodule.c
Python/ceval.c
Python/compile.c
Python/frame.c
Python/opcode_targets.h
Python/pystate.c
Python/specialize.c