]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46409: Make generators in bytecode (GH-30633)
authorMark Shannon <mark@hotpy.org>
Thu, 20 Jan 2022 11:46:39 +0000 (11:46 +0000)
committerGitHub <noreply@github.com>
Thu, 20 Jan 2022 11:46:39 +0000 (11:46 +0000)
commitb04dfbbe4bd7071d46c8688c2263726ea31d33cd
tree17989daaffa384df343b53289845fba667e20acc
parentd05a66339b5e07d72d96e4c30a34cc3821bb61a2
bpo-46409: Make generators in bytecode (GH-30633)

* Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes.

* Trim frame and generator by word each.

* Minor refactor of frame.c

* Update test.test_sys to account for smaller frames.

* Treat generator functions as normal functions when evaluating and specializing.
18 files changed:
Doc/library/dis.rst
Include/cpython/genobject.h
Include/internal/pycore_frame.h
Include/opcode.h
Lib/importlib/_bootstrap_external.py
Lib/inspect.py
Lib/opcode.py
Lib/test/test_compile.py
Lib/test/test_generators.py
Lib/test/test_sys.py
Misc/NEWS.d/next/Core and Builtins/2022-01-17-12-57-27.bpo-46409.HouS6m.rst [new file with mode: 0644]
Objects/frameobject.c
Objects/genobject.c
Python/ceval.c
Python/compile.c
Python/frame.c
Python/opcode_targets.h
Python/specialize.c