Skip to content
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

GH-120024: Refactor code a bit so that escaping calls can be wrapped in spill code in code generator #122693

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Aug 5, 2024

A preparatory refactoring for deferred reference counting.

We expect the code generator to spill the stack pointer and any necessary values to the stack around escaping calls.
But this is tricky if the call is embedded in a control flow statement.

This PR moves the calls out of control flow statements.
Changes code like if (escaping_call(...)) { into int err = escaping_call(...); if (err) {

@markshannon
Copy link
Member Author

The 3 failures are know failures: Network issues on the emulated platforms and a hypothesis issue.

@markshannon markshannon merged commit a8be8fc into python:main Aug 6, 2024
56 of 59 checks passed
@markshannon markshannon deleted the move-escaping-calls-out-of-conditions branch August 6, 2024 10:14
brandtbucher pushed a commit to brandtbucher/cpython that referenced this pull request Aug 7, 2024
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants