-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Conversation
…in the instruction definitions
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. |
I know Cinder uses it, but it isn't part of any public API and we don't want it to be. |
Yeah I don't think it should be documented or in What's New either. |
|
This removes the types from stack items in the code generator.
E.g
becomes
and the cast from
_PyStackRef
to_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.