diff options
| author | Guido van Rossum <guido@python.org> | 2024-02-28 17:55:56 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-28 17:55:56 (GMT) |
| commit | e2a3e4b7488aff6fdc704a0f258bc315e96c1d6e (patch) | |
| tree | 142eeff349aa95321db553d5de7a4847e0128c01 /Python/optimizer_analysis.c | |
| parent | f58f8cef7445ea04a69ba3e2848fffdb6b72df91 (diff) | |
| download | cpython-e2a3e4b7488aff6fdc704a0f258bc315e96c1d6e.zip cpython-e2a3e4b7488aff6fdc704a0f258bc315e96c1d6e.tar.gz cpython-e2a3e4b7488aff6fdc704a0f258bc315e96c1d6e.tar.bz2 | |
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`.
Diffstat (limited to 'Python/optimizer_analysis.c')
| -rw-r--r-- | Python/optimizer_analysis.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c index b29a00c..8e408ff 100644 --- a/Python/optimizer_analysis.c +++ b/Python/optimizer_analysis.c @@ -294,7 +294,9 @@ remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer, #define sym_new_null _Py_uop_sym_new_null #define sym_matches_type _Py_uop_sym_matches_type #define sym_set_null _Py_uop_sym_set_null +#define sym_set_non_null _Py_uop_sym_set_non_null #define sym_set_type _Py_uop_sym_set_type +#define sym_set_const _Py_uop_sym_set_const #define frame_new _Py_uop_frame_new #define frame_pop _Py_uop_frame_pop |
