]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-115816: Improve internal symbols API in optimizer (#116028)
authorGuido van Rossum <guido@python.org>
Wed, 28 Feb 2024 17:55:56 +0000 (09:55 -0800)
committerGitHub <noreply@github.com>
Wed, 28 Feb 2024 17:55:56 +0000 (17:55 +0000)
commite2a3e4b7488aff6fdc704a0f258bc315e96c1d6e
tree142eeff349aa95321db553d5de7a4847e0128c01
parentf58f8cef7445ea04a69ba3e2848fffdb6b72df91
gh-115816: Improve internal symbols API in optimizer (#116028)

- Any `sym_set_...` call that attempts to set conflicting information
  cause the symbol to become `bottom` (contradiction).
- All `sym_is...` and similar calls return false or NULL for `bottom`.
- Everything's tested.
- The tests still pass with `PYTHONUOPSOPTIMIZE=1`.
Include/internal/pycore_optimizer.h
Python/optimizer_analysis.c
Python/optimizer_bytecodes.c
Python/optimizer_symbols.c