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`.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user