@@ -148,8 +148,7 @@ dummy_func(void) {
148148 sym_set_type (owner , probable_type );
149149 sym_set_type_version (owner , type_version );
150150 if ((probable_type -> tp_flags & Py_TPFLAGS_IMMUTABLETYPE ) == 0 ) {
151- PyType_Watch (TYPE_WATCHER_ID , (PyObject * )probable_type );
152- _Py_BloomFilter_Add (dependencies , probable_type );
151+ watch_type (probable_type , dependencies );
153152 }
154153 }
155154 else {
@@ -237,8 +236,7 @@ dummy_func(void) {
237236 else {
238237 sym_set_const (owner , type );
239238 if ((((PyTypeObject * )type )-> tp_flags & Py_TPFLAGS_IMMUTABLETYPE ) == 0 ) {
240- PyType_Watch (TYPE_WATCHER_ID , type );
241- _Py_BloomFilter_Add (dependencies , type );
239+ watch_type ((PyTypeObject * )type , dependencies );
242240 }
243241 }
244242 }
@@ -256,8 +254,7 @@ dummy_func(void) {
256254 probable_type -> tp_version_tag == type_version ) {
257255 sym_set_type (owner , probable_type );
258256 sym_set_type_version (owner , type_version );
259- PyType_Watch (TYPE_WATCHER_ID , (PyObject * )probable_type );
260- _Py_BloomFilter_Add (dependencies , probable_type );
257+ watch_type (probable_type , dependencies );
261258 }
262259 else {
263260 ctx -> contradiction = true;
@@ -1318,8 +1315,7 @@ dummy_func(void) {
13181315 assert (init != NULL );
13191316 assert (PyFunction_Check (init ));
13201317 callable = sym_new_const (ctx , init );
1321- PyType_Watch (TYPE_WATCHER_ID , callable_o );
1322- _Py_BloomFilter_Add (dependencies , callable_o );;
1318+ watch_type ((PyTypeObject * )callable_o , dependencies );
13231319 }
13241320 else {
13251321 callable = sym_new_not_null (ctx );
@@ -2026,8 +2022,7 @@ dummy_func(void) {
20262022 ADD_OP (_SWAP , 3 , 0 );
20272023 optimize_pop_top (ctx , this_instr , method_and_self [0 ]);
20282024 if ((type -> tp_flags & Py_TPFLAGS_IMMUTABLETYPE ) == 0 ) {
2029- PyType_Watch (TYPE_WATCHER_ID , (PyObject * )type );
2030- _Py_BloomFilter_Add (dependencies , type );
2025+ watch_type (type , dependencies );
20312026 }
20322027 method_and_self [0 ] = sym_new_const (ctx , descr );
20332028 optimized = true;
0 commit comments