@@ -147,9 +147,7 @@ dummy_func(void) {
147147 // Promote the probable type version to a known one.
148148 sym_set_type (owner , probable_type );
149149 sym_set_type_version (owner , type_version );
150- if ((probable_type -> tp_flags & Py_TPFLAGS_IMMUTABLETYPE ) == 0 ) {
151- watch_type (probable_type , dependencies );
152- }
150+ watch_type (probable_type , dependencies );
153151 }
154152 else {
155153 ctx -> contradiction = true;
@@ -235,9 +233,7 @@ dummy_func(void) {
235233 }
236234 else {
237235 sym_set_const (owner , type );
238- if ((((PyTypeObject * )type )-> tp_flags & Py_TPFLAGS_IMMUTABLETYPE ) == 0 ) {
239- watch_type ((PyTypeObject * )type , dependencies );
240- }
236+ watch_type ((PyTypeObject * )type , dependencies );
241237 }
242238 }
243239 }
@@ -2021,9 +2017,7 @@ dummy_func(void) {
20212017 0 , (uintptr_t )descr );
20222018 ADD_OP (_SWAP , 3 , 0 );
20232019 optimize_pop_top (ctx , this_instr , method_and_self [0 ]);
2024- if ((type -> tp_flags & Py_TPFLAGS_IMMUTABLETYPE ) == 0 ) {
2025- watch_type (type , dependencies );
2026- }
2020+ watch_type (type , dependencies );
20272021 method_and_self [0 ] = sym_new_const (ctx , descr );
20282022 optimized = true;
20292023 }
0 commit comments