Skip to content

GH-128682: Make PyStackRef_CLOSE escaping.#129404

Merged
markshannon merged 9 commits intopython:mainfrom
faster-cpython:close-escapes-2
Feb 3, 2025
Merged

GH-128682: Make PyStackRef_CLOSE escaping.#129404
markshannon merged 9 commits intopython:mainfrom
faster-cpython:close-escapes-2

Conversation

@markshannon
Copy link
Member

@markshannon markshannon commented Jan 28, 2025

Makes PyStackRef_CLOSE escaping.

PyStackRef_CLOSE kills the variable, and then escapes.
This PR adds an EscapingCall dataclass to the analysis, with a new kill attribute. PyStackRef_CLOSE and PyStackRef_XCLOSE set the kill attribute, so the code generator knows to kill the argument before spilling.

Doing so, means that pop_N_error labels no longer work as we need to adjust the stack pointer before all PyStackRef_CLOSE rather than once at the jump to error.

Performance numbers to come...

Loading
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.

4 participants