mirror of
https://github.com/python/cpython.git
synced 2026-06-05 01:10:53 +00:00
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:
parent
ffb543d32f
commit
70bd1c2dd2
29 changed files with 2662 additions and 1548 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue