@@ -607,10 +607,10 @@ boolean doManaged(PythonBuiltinClass left, PythonBuiltinClassType right) {
607
607
return left .getType () == right ;
608
608
}
609
609
610
- @ Specialization ( limit = "3" )
610
+ @ Specialization
611
611
boolean doNativeSingleContext (PythonAbstractNativeObject left , PythonAbstractNativeObject right ,
612
- @ CachedLibrary ("left " ) ReferenceLibrary referenceLibrary ) {
613
- return referenceLibrary . isSame (left , right );
612
+ @ CachedLibrary (limit = "3 " ) InteropLibrary lib ) {
613
+ return lib . isIdentical (left , right , lib );
614
614
}
615
615
616
616
@ Fallback
@@ -639,12 +639,12 @@ static PythonBuiltinClassType doPythonBuiltinClassType(@SuppressWarnings("unused
639
639
return cachedClassType ;
640
640
}
641
641
642
- @ Specialization (guards = "isPythonAbstractClass(object)" , limit = "1" , assumptions = "singleContextAssumption()" , rewriteOn = NotSameTypeException .class )
642
+ @ Specialization (guards = "isPythonAbstractClass(object)" , assumptions = "singleContextAssumption()" , rewriteOn = NotSameTypeException .class )
643
643
static Object doPythonAbstractClass (Object object ,
644
644
@ Cached ("weak(object)" ) WeakReference <PythonAbstractClass > cachedObjectRef ,
645
- @ CachedLibrary ("object " ) ReferenceLibrary referenceLibrary ) throws NotSameTypeException {
645
+ @ CachedLibrary (limit = "2 " ) InteropLibrary lib ) throws NotSameTypeException {
646
646
Object cachedObject = cachedObjectRef .get ();
647
- if (referenceLibrary . isSame (object , cachedObject )) {
647
+ if (lib . isIdentical (object , cachedObject , lib )) {
648
648
return cachedObject ;
649
649
}
650
650
CompilerDirectives .transferToInterpreterAndInvalidate ();
0 commit comments