mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-116088: Insert bottom checks after all sym_set_...() calls (#116089)
This changes the `sym_set_...()` functions to return a `bool` which is `false` when the symbol is `bottom` after the operation. All calls to such functions now check this result and go to `hit_bottom`, a special error label that prints a different message and then reports that it wasn't able to optimize the trace. No executor will be produced in this case.
This commit is contained in:
parent
3b6f4cadf1
commit
0656509033
7 changed files with 106 additions and 47 deletions
|
@ -91,10 +91,10 @@ extern _Py_UopsSymbol *_Py_uop_sym_new_type(
|
|||
extern _Py_UopsSymbol *_Py_uop_sym_new_const(_Py_UOpsContext *ctx, PyObject *const_val);
|
||||
extern _Py_UopsSymbol *_Py_uop_sym_new_null(_Py_UOpsContext *ctx);
|
||||
extern bool _Py_uop_sym_matches_type(_Py_UopsSymbol *sym, PyTypeObject *typ);
|
||||
extern void _Py_uop_sym_set_null(_Py_UopsSymbol *sym);
|
||||
extern void _Py_uop_sym_set_non_null(_Py_UopsSymbol *sym);
|
||||
extern void _Py_uop_sym_set_type(_Py_UopsSymbol *sym, PyTypeObject *typ);
|
||||
extern void _Py_uop_sym_set_const(_Py_UopsSymbol *sym, PyObject *const_val);
|
||||
extern bool _Py_uop_sym_set_null(_Py_UopsSymbol *sym);
|
||||
extern bool _Py_uop_sym_set_non_null(_Py_UopsSymbol *sym);
|
||||
extern bool _Py_uop_sym_set_type(_Py_UopsSymbol *sym, PyTypeObject *typ);
|
||||
extern bool _Py_uop_sym_set_const(_Py_UopsSymbol *sym, PyObject *const_val);
|
||||
extern bool _Py_uop_sym_is_bottom(_Py_UopsSymbol *sym);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue