mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
gh-115480: Type and constant propagation for int BINARY_OPs (GH-115478)
This commit is contained in:
parent
ed23839dc5
commit
4ebf8fbdab
3 changed files with 126 additions and 16 deletions
|
@ -341,6 +341,18 @@ sym_new_const(_Py_UOpsAbstractInterpContext *ctx, PyObject *const_val)
|
|||
return temp;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
is_const(_Py_UOpsSymType *sym)
|
||||
{
|
||||
return sym->const_val != NULL;
|
||||
}
|
||||
|
||||
static inline PyObject *
|
||||
get_const(_Py_UOpsSymType *sym)
|
||||
{
|
||||
return sym->const_val;
|
||||
}
|
||||
|
||||
static _Py_UOpsSymType*
|
||||
sym_new_null(_Py_UOpsAbstractInterpContext *ctx)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue