Skip to content

bpo-46039: Split yield from in two #30035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 15, 2021

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Dec 10, 2021

Splits YIELD_FROM into SEND and JUMP_ABSOLUTE. This is part of our push to make all operations explicit in the bytecode for instrumentation and optimization.

This is a partial implementation of bpo-46039.
It does not do the threeway split described in issue, nor use zero-cost exception handling to replace the special case case in gen.throw().

https://bugs.python.org/issue46039

static int
compiler_add_yield_from(struct compiler *c)
{
basicblock *start, *jump, *exit;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if exit had another name, as this shadows the exit() function

@markshannon markshannon added 🔨 test-with-buildbots Test PR w/ buildbots; report in status section and removed DO-NOT-MERGE labels Dec 14, 2021
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @markshannon for commit ec9dd28 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants