Skip to content

Commit 7885033

Browse files
Sacul0457cocolato
andauthored
Partially address reviews
Co-authored-by: Hai Zhu <haiizhu@outlook.com>
1 parent c72c139 commit 7885033

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Python/optimizer_bytecodes.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ dummy_func(void) {
10771077
// then we know this __init__ is definitely the same one as in the cache.
10781078
// We can promote callable to a known constant. This does not need a
10791079
// type watcher, as we do not remove this _CHECK_AND_ALLOCATE_OBJECT guard.
1080-
if (sym_is_not_null(self_or_null) && sym_matches_type(callable, &PyType_Type)) {
1080+
if (sym_is_null(self_or_null) && sym_matches_type(callable, &PyType_Type)) {
10811081
ADD_OP(_NOP, 0, 0);
10821082
}
10831083
PyHeapTypeObject *cls = (PyHeapTypeObject *)probable_callable;
@@ -1100,7 +1100,8 @@ dummy_func(void) {
11001100
PyType_Watch(TYPE_WATCHER_ID, (PyObject *)type);
11011101
_Py_BloomFilter_Add(dependencies, type);
11021102
}
1103-
}
1103+
}
1104+
self_or_null = sym_new_not_null(ctx);
11041105
}
11051106
}
11061107

0 commit comments

Comments
 (0)