Skip to content

GH-150516: Reduce the work done to spill and reload the stack around calls#151587

Open
markshannon wants to merge 2 commits into
python:mainfrom
markshannon:streamline-stack-spilling
Open

GH-150516: Reduce the work done to spill and reload the stack around calls#151587
markshannon wants to merge 2 commits into
python:mainfrom
markshannon:streamline-stack-spilling

Conversation

@markshannon

@markshannon markshannon commented Jun 17, 2026

Copy link
Copy Markdown
Member

Avoids needless spilling of the stack around calls, as described in the issue.

Also adds the stackpointer_valid to frames in the debug build to verify that the frame's stack pointer is not used when it shouldn't be. frame->stackpointer_valid is equivalent to the old frame->stackpointer != NULL check.

The new scheme is more precise, so I needed to change a few stack saving/syncing/reloading operations to better reflect the true semantics.

@markshannon

Copy link
Copy Markdown
Member Author

Skipping news as this has no impact on any users

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.

1 participant