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_bytecodes.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_bytecodes.c')
-rw-r--r-- | Python/optimizer_bytecodes.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index 6873738..b65e90b 100644 --- a/Python/optimizer_bytecodes.c +++ b/Python/optimizer_bytecodes.c @@ -22,7 +22,9 @@ typedef struct _Py_UOpsAbstractFrame _Py_UOpsAbstractFrame; #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 |