]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-106812: Small stack effect fixes (#107759)
authorGuido van Rossum <guido@python.org>
Tue, 8 Aug 2023 04:32:42 +0000 (21:32 -0700)
committerGitHub <noreply@github.com>
Tue, 8 Aug 2023 04:32:42 +0000 (21:32 -0700)
commit2df58dcd500dbedc61d0630374f9e94c522fe523
tree89ef17fd39005e7c133588dead81cbed6021e4c4
parent707018cc75558d6695e9e199a3ed0c8a4ff7cbcc
gh-106812: Small stack effect fixes (#107759)

- 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 **`).
Tools/cases_generator/interpreter_definition.md
Tools/cases_generator/parsing.py
Tools/cases_generator/stacking.py