From e2a3e4b7488aff6fdc704a0f258bc315e96c1d6e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 28 Feb 2024 09:55:56 -0800 Subject: 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`. --- Python/optimizer_bytecodes.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/optimizer_bytecodes.c') diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index 68737389c66..b65e90bf980 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 -- cgit v1.2.3