Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
GH-135379: Remove types from stack items in code generator.#135384
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
GH-135379: Remove types from stack items in code generator. #135384
Uh oh!
There was an error while loading. Please reload this page.
Conversation
markshannon commented Jun 11, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
…in the instruction definitions
Fidget-Spinner commented Jun 11, 2025
Looks good. However, can you add a news entry please? Downstream forks use the DSL now (like Cinder), so I think this should have a news entry. It's also big enough that it warrants it. |
markshannon commented Jun 11, 2025
I know Cinder uses it, but it isn't part of any public API and we don't want it to be. |
Fidget-Spinner commented Jun 11, 2025
Yeah I don't think it should be documented or in What's New either. |
c87b5b2 into python:mainUh oh!
There was an error while loading. Please reload this page.
bedevere-bot commented Jun 11, 2025
|
…thonGH-135384) * Make casts explicit in the instruction definitions
…thonGH-135384) * Make casts explicit in the instruction definitions
…thonGH-135384) * Make casts explicit in the instruction definitions
…thonGH-135384) * Make casts explicit in the instruction definitions
This removes the types from stack items in the code generator.
E.g
becomes
and the cast from
_PyStackRefto_PyInterpreterFrame *is made explicit in the op definition.This is a net zero change in terms of code size, but removes fiddly code generator code and replaces it with simple casts.
This also means that any future changes to the code generator, specifically for TOS caching, do not have to worry about inserting casts.