Skip to content

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Sep 2, 2025

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.

Very nice improvement!

// Max stacklen
int stack_len;
int locals_len;
uint32_t globals_checked_version;
Copy link
Member

Choose a reason for hiding this comment

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

For consistency, this should be placed after the last few fields in the current struct and they should be commented. E.g. // globals to constant promotion.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fields should be in either ascending or descending order, for best packing, so I can't just add the fields at the end.
I'll add the comment.

@markshannon markshannon marked this pull request as ready for review September 3, 2025 14:33
@markshannon markshannon requested a review from tomasr8 as a code owner September 3, 2025 14:33
@markshannon markshannon merged commit 3b83257 into python:main Sep 18, 2025
70 checks passed
@markshannon markshannon deleted the move-globals-removal-to-main-optimizer-pass branch September 18, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JIT global-to-constant promotion doesn't properly validate the globals dictionary at runtime

2 participants