Uh oh!
There was an error while loading. Please reload this page.
GH-135379: Remove types from stack items in code generator. - #135384
Conversation
…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. |
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.