Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
We want to be able to specialize iteration over generators and awaiting coroutines. Both for PEP 659 and for higher tier optimizers.
For the theory seefaster-cpython/ideas#457
To do this we need:
- Shim frames to keep the various returns simpleGH-96421: Insert shim frame on entry to interpreter #96319
- Modify
FOR_ITERto leave iterator and value on the stack when exitingGH-96793: ChangeFOR_ITERto not pop the iterator on exhaustion. #96801 - Implement specialization of
FOR_ITERfor generatorsGH-96793: Specialize FOR_ITER for generators. #98772 - Implement specialization of
SENDfor coroutines
Edited:
Remove the requirement for aGEN_RETURN_VALUE instruction. We might want one to simplify frame popping, but it isn't needed for specializing.