]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-127022: Simplify `PyStackRef_FromPyObjectSteal` (#127024)
authorSam Gross <colesbury@gmail.com>
Fri, 22 Nov 2024 17:55:33 +0000 (17:55 +0000)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 17:55:33 +0000 (12:55 -0500)
commit4759ba6eec9f0b36b24b8eb7e7b120d471c67e82
treeccadc7b0918507133e2f4ec4abff6d517f2b618e
parent8214e0f709010a0e1fa06dc2ce004b5f6103cc6b
gh-127022: Simplify `PyStackRef_FromPyObjectSteal` (#127024)

This gets rid of the immortal check in `PyStackRef_FromPyObjectSteal()`.
Overall, this improves performance about 2% in the free threading
build.

This also renames `PyStackRef_Is()` to `PyStackRef_IsExactly()` because
the macro requires that the tag bits of the arguments match, which is
only true in certain special cases.
Include/internal/pycore_stackref.h
Python/bytecodes.c
Python/executor_cases.c.h
Python/generated_cases.c.h
Tools/cases_generator/analyzer.py