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
This commit is contained in:
Mark Shannon 2026-05-05 15:19:16 +01:00 committed by GitHub
parent ffb543d32f
commit 70bd1c2dd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 2662 additions and 1548 deletions

View file

@ -2156,7 +2156,7 @@ codegen_for(compiler *c, stmt_ty s)
USE_LABEL(c, cleanup);
/* It is important for instrumentation that the `END_FOR` comes first.
* Iteration over a generator will jump to the first of these instructions,
* but a non-generator will jump to a later instruction.
* but a non-generator will jump to the second instruction.
*/
ADDOP(c, NO_LOCATION, END_FOR);
ADDOP(c, NO_LOCATION, POP_ITER);