mirror of
https://github.com/python/cpython.git
synced 2026-05-06 12:49:07 -04:00
gh-131798: do not watch immutable types in JIT (#148383)
This commit is contained in:
@@ -142,8 +142,10 @@ dummy_func(void) {
|
||||
PyTypeObject *probable_type = sym_get_probable_type(owner);
|
||||
if (probable_type->tp_version_tag == type_version && sym_set_type_version(owner, type_version)) {
|
||||
// Promote the probable type version to a known one.
|
||||
PyType_Watch(TYPE_WATCHER_ID, (PyObject *)probable_type);
|
||||
_Py_BloomFilter_Add(dependencies, probable_type);
|
||||
if ((probable_type->tp_flags & Py_TPFLAGS_IMMUTABLETYPE) == 0) {
|
||||
PyType_Watch(TYPE_WATCHER_ID, (PyObject *)probable_type);
|
||||
_Py_BloomFilter_Add(dependencies, probable_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user