@@ -402,9 +402,6 @@ lookup_attr(JitOptContext *ctx, _PyBloomFilter *dependencies, _PyUOpInstruction
402402 if (_Py_IsImmortal (lookup ) || (type -> tp_flags & Py_TPFLAGS_IMMUTABLETYPE )) {
403403 opcode = immortal ;
404404 }
405- ADD_OP (_SWAP , 3 , 0 );
406- ADD_OP (_POP_TOP , 0 , 0 );
407- ADD_OP (_POP_TOP , 0 , 0 );
408405 ADD_OP (opcode , 0 , (uintptr_t )lookup );
409406 PyType_Watch (TYPE_WATCHER_ID , (PyObject * )type );
410407 _Py_BloomFilter_Add (dependencies , type );
@@ -441,15 +438,19 @@ lookup_super_attr(JitOptContext *ctx, _PyBloomFilter *dependencies,
441438 if (_Py_IsImmortal (lookup ) || (obj_type -> tp_flags & Py_TPFLAGS_IMMUTABLETYPE )) {
442439 opcode = immortal ;
443440 }
441+ ADD_OP (_SWAP , 3 , 0 );
442+ ADD_OP (_POP_TOP , 0 , 0 );
443+ ADD_OP (_POP_TOP , 0 , 0 );
444444 ADD_OP (opcode , 0 , (uintptr_t )lookup );
445445 PyType_Watch (TYPE_WATCHER_ID , (PyObject * )su_type );
446446 _Py_BloomFilter_Add (dependencies , su_type );
447447 PyType_Watch (TYPE_WATCHER_ID , (PyObject * )obj_type );
448448 _Py_BloomFilter_Add (dependencies , obj_type );
449449 JitOptRef result = sym_new_const (ctx , lookup );
450450 Py_DECREF (lookup );
451+ return result ;
451452 }
452- return result ;
453+ return sym_new_not_null ( ctx ) ;
453454}
454455
455456static
0 commit comments