Skip to content

GH-131498: manage stacks automatically #132074

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 10 commits into from
Apr 4, 2025

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Apr 4, 2025

This is the final preparatory PR for top-of-stack caching

This PR:

  • Removes the stack manipulation macros. Instructions must declare values as dead, and let the code generator pop them from the stack
  • Updates the instrumented instructions to be explicit about their stack effect
  • Supports mixing of scalars and arrays on the stack. The code generator pushes scalars to memory if needed for an array.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
@markshannon
Copy link
Member Author

markshannon commented Apr 4, 2025

The MSVC tail calling interpreter failure seems unrelated to this PR.

@markshannon markshannon merged commit 7099c75 into python:main Apr 4, 2025
70 of 71 checks passed
@markshannon markshannon deleted the code-gen-handle-stacks branch April 4, 2025 17:09
picnixz pushed a commit to picnixz/cpython that referenced this pull request Apr 5, 2025
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
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.

3 participants