mirror of
https://github.com/python/cpython.git
synced 2026-04-20 02:40:59 +00:00
gh-148398: add type watcher in _CHECK_ATTR_CLASS (GH-148399)
This commit is contained in:
parent
3a7df632c9
commit
30c698a655
3 changed files with 9 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
Fix a bug in the JIT optimizer where class attribute loads were not invalidated after type mutation.
|
||||
|
|
@ -226,6 +226,10 @@ dummy_func(void) {
|
|||
}
|
||||
else {
|
||||
sym_set_const(owner, type);
|
||||
if ((((PyTypeObject *)type)->tp_flags & Py_TPFLAGS_IMMUTABLETYPE) == 0) {
|
||||
PyType_Watch(TYPE_WATCHER_ID, type);
|
||||
_Py_BloomFilter_Add(dependencies, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
4
Python/optimizer_cases.c.h
generated
4
Python/optimizer_cases.c.h
generated
|
|
@ -2571,6 +2571,10 @@
|
|||
}
|
||||
else {
|
||||
sym_set_const(owner, type);
|
||||
if ((((PyTypeObject *)type)->tp_flags & Py_TPFLAGS_IMMUTABLETYPE) == 0) {
|
||||
PyType_Watch(TYPE_WATCHER_ID, type);
|
||||
_Py_BloomFilter_Add(dependencies, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue