]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. (#120640)
authorMark Shannon <mark@hotpy.org>
Tue, 18 Jun 2024 11:17:46 +0000 (12:17 +0100)
committerGitHub <noreply@github.com>
Tue, 18 Jun 2024 11:17:46 +0000 (12:17 +0100)
commit9cefcc0ee781a1bef9e0685c2271237005fb488b
tree7c02067f4e021d90ec4fd850d9a06315b8fc39ab
parent73dc1c678eb720c2ced94d2f435a908bb6d18566
GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. (#120640)

* Remove BEFORE_WITH and BEFORE_ASYNC_WITH instructions.

* Add LOAD_SPECIAL instruction

* Reimplement `with` and `async with` statements using LOAD_SPECIAL
22 files changed:
Doc/library/dis.rst
Include/ceval.h
Include/internal/pycore_ceval.h
Include/internal/pycore_object.h
Include/internal/pycore_opcode_metadata.h
Include/internal/pycore_uop_ids.h
Include/internal/pycore_uop_metadata.h
Include/opcode_ids.h
Lib/_opcode_metadata.py
Lib/importlib/_bootstrap_external.py
Lib/test/test_dis.py
Misc/NEWS.d/next/Core and Builtins/2024-06-17-12-20-20.gh-issue-120507.94lz2J.rst [new file with mode: 0644]
Objects/typeobject.c
Programs/test_frozenmain.h
Python/bytecodes.c
Python/ceval.c
Python/compile.c
Python/executor_cases.c.h
Python/generated_cases.c.h
Python/opcode_targets.h
Python/optimizer_bytecodes.c
Python/optimizer_cases.c.h