]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-116088: Insert bottom checks after all sym_set_...() calls (#116089)
authorGuido van Rossum <guido@python.org>
Thu, 29 Feb 2024 18:55:29 +0000 (10:55 -0800)
committerGitHub <noreply@github.com>
Thu, 29 Feb 2024 18:55:29 +0000 (18:55 +0000)
commit0656509033948780e6703391daca773c779041f7
treef75c2c923b52ee8367c9f033cb911ac8dc99bfca
parent3b6f4cadf19e6a4edd2cbbbc96a0a4024b395648
gh-116088: Insert bottom checks after all sym_set_...() calls (#116089)

This changes the `sym_set_...()` functions to return a `bool` which is `false`
when the symbol is `bottom` after the operation.

All calls to such functions now check this result and go to `hit_bottom`,
a special error label that prints a different message and then reports
that it wasn't able to optimize the trace. No executor will be produced
in this case.
Include/internal/pycore_optimizer.h
Lib/test/test_capi/test_opt.py
Python/optimizer_analysis.c
Python/optimizer_bytecodes.c
Python/optimizer_cases.c.h
Python/optimizer_symbols.c
Tools/cases_generator/optimizer_generator.py