Skip to content

Conversation

@markshannon
Copy link
Member

@markshannon markshannon commented Jul 17, 2024

To support deferred reference counting, the stack pointer will need to be spilled around many calls.
The current implementation of the stack pointer as an offset from the 0th local will be too slow for that as each spill and reload will need to perform a calculation of the stack pointer from the stacktop or vice-versa.

This PR changes the stacktop offset to stackpointer pointer, so that no calculation is needed for the spill.

Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

Even without deferred refcounts, this is a simplification in my eyes (and also brings Tier 1 and Tier 2 representations closer together), so we should do this regardless.

@markshannon markshannon merged commit 169324c into python:main Jul 18, 2024
@markshannon markshannon deleted the use-pointer-for-stack-pointer branch August 6, 2024 10:13
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