Skip to content

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Mar 28, 2025

The main change in this refactoring is to replace the mutable StackOffset with an immutable PointerOffset.

The new class fills much the same role.
We use these offsets like numerical values, so making them immutable makes the code more robust and a bit simpler.

There is no change to the generated code, apart from a few variable declarations that get reordered.

@markshannon markshannon merged commit c535a13 into python:main Mar 31, 2025
71 checks passed
@markshannon markshannon deleted the code-gen-refactor-again branch March 31, 2025 14:54
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
…131827)

* Rename 'defined' attribute to 'in_local' to more accurately reflect how it is used

* Make death of variables explicit even for array variables.

* Convert in_memory from boolean to stack offset

* Don't apply liveness analyis to optimizer generated code

* Add 'out' parameter to stack.pop
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