Skip to content

gh-106812: Small stack effect fixes #107759

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

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Aug 8, 2023

  • Generalize the syntax for the type of a stack effect to allow a trailing *, so we can declare something as e.g. PyCodeObject *.
  • When generating assignments for stack effects, the type of the value on the stack should be the default (i.e., PyObject *) even when the variable copied to/from it has a different type, so that an appropriate cast is generated. However, not when the variable is an array -- then the type is taken from the variable (as it is always PyObject **).

@gvanrossum gvanrossum changed the title Small stack effect fixes gh-106812: Small stack effect fixes Aug 8, 2023
@gvanrossum gvanrossum merged commit 2df58dc into python:main Aug 8, 2023
@gvanrossum gvanrossum deleted the stack-effect-fixes branch August 8, 2023 04:32
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.

3 participants