Skip to content

gh-106812: Small stack effect fixes - #107759

Merged
gvanrossum merged 2 commits into
python:mainfrom
gvanrossum:stack-effect-fixes
Aug 8, 2023
Merged

gvanrossum merged 2 commits into
python:mainfrom
gvanrossum:stack-effect-fixes

Conversation

@gvanrossum

@gvanrossum gvanrossum commented Aug 8, 2023 •

Copy link
Copy Markdown
Member
  • 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