Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb7efd4

Browse files
committed
Fix a minor bug in optimizer symbols
1 parent b83d053 commit bb7efd4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Python/optimizer_symbols.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,15 @@ _Py_uop_sym_set_const(_Py_UopsSymbol *sym, PyObject *const_val)
164164
return true;
165165
}
166166

167-
168167
bool
169168
_Py_uop_sym_set_null(_Py_UopsSymbol *sym)
170169
{
170+
if (_Py_uop_sym_is_not_null(sym)) {
171+
sym_set_bottom(sym);
172+
return false;
173+
}
171174
sym_set_flag(sym, IS_NULL);
172-
return !_Py_uop_sym_is_bottom(sym);
175+
return true;
173176
}
174177

175178
bool

0 commit comments

Comments
 (0)