]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-143732: SEND specialization (GH-148963)
authorMark Shannon <Mark.Shannon@arm.com>
Tue, 5 May 2026 14:19:16 +0000 (15:19 +0100)
committerGitHub <noreply@github.com>
Tue, 5 May 2026 14:19:16 +0000 (15:19 +0100)
commit70bd1c2dd293a34cf242564787fb1fc8e9da9ab0
treed3200eccfaab4a53b48980a7080ed52be06ba932
parentffb543d32f14803e8379c15a0a2d96c6b4c4dacd
GH-143732: SEND specialization (GH-148963)

* SEND specialization. Adds 2 new specialized instructions:

* SEND_VIRTUAL: for sends to virtual iterators e.g lists and tuples
* SEND_ASYNC_GEN: for sends to async generators

Tweak FOR_ITER_VIRTUAL so that SEND_VIRTUAL and FOR_ITER_VIRTUAL use equivalent guards
29 files changed:
Include/cpython/object.h
Include/internal/pycore_abstract.h
Include/internal/pycore_genobject.h
Include/internal/pycore_magic_number.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/test/test_capi/test_opt.py
Lib/test/test_opcache.py
Lib/test/test_sys_settrace.py
Modules/_testinternalcapi/test_cases.c.h
Modules/_testinternalcapi/test_targets.h
Objects/abstract.c
Objects/genobject.c
Python/bytecodes.c
Python/ceval_macros.h
Python/codegen.c
Python/executor_cases.c.h
Python/generated_cases.c.h
Python/jit.c
Python/opcode_targets.h
Python/optimizer.c
Python/optimizer_bytecodes.c
Python/optimizer_cases.c.h
Python/record_functions.c.h
Python/specialize.c
Tools/cases_generator/analyzer.py