@@ -434,9 +434,9 @@ static Object doSingleton(@SuppressWarnings("unused") CExtContext cextContext, @
434
434
return nativeWrapper ;
435
435
}
436
436
437
- @ Specialization (guards = "object == cachedObject" , limit = "3" )
437
+ @ Specialization (guards = "object == cachedObject" , limit = "3" , assumptions = "singleContextAssumption()" )
438
438
static Object doPythonClass (@ SuppressWarnings ("unused" ) CExtContext cextContext , @ SuppressWarnings ("unused" ) PythonManagedClass object ,
439
- @ SuppressWarnings ("unused" ) @ Cached ("object" ) PythonManagedClass cachedObject ,
439
+ @ SuppressWarnings ("unused" ) @ Cached (value = "object" , weak = true ) PythonManagedClass cachedObject ,
440
440
@ Cached ("wrapNativeClass(object)" ) PythonClassNativeWrapper wrapper ) {
441
441
return wrapper ;
442
442
}
@@ -690,7 +690,7 @@ static Object doSingleton(@SuppressWarnings("unused") CExtContext cextContext, @
690
690
return nativeWrapper ;
691
691
}
692
692
693
- @ Specialization (guards = "object == cachedObject" , limit = "3" )
693
+ @ Specialization (guards = "object == cachedObject" , limit = "3" , assumptions = "singleContextAssumption()" )
694
694
static Object doPythonClass (@ SuppressWarnings ("unused" ) CExtContext cextContext , @ SuppressWarnings ("unused" ) PythonManagedClass object ,
695
695
@ SuppressWarnings ("unused" ) @ Cached ("object" ) PythonManagedClass cachedObject ,
696
696
@ Cached ("wrapNativeClass(object)" ) PythonClassNativeWrapper wrapper ) {
@@ -873,7 +873,7 @@ static Object doSingleton(CExtContext cextContext, PythonAbstractObject object,
873
873
return ToNewRefNode .doSingleton (cextContext , object , contextRef );
874
874
}
875
875
876
- @ Specialization (guards = "object == cachedObject" , limit = "3" )
876
+ @ Specialization (guards = "object == cachedObject" , limit = "3" , assumptions = "singleContextAssumption()" )
877
877
static Object doPythonClass (@ SuppressWarnings ("unused" ) CExtContext cextContext , @ SuppressWarnings ("unused" ) PythonManagedClass object ,
878
878
@ SuppressWarnings ("unused" ) @ Cached ("object" ) PythonManagedClass cachedObject ,
879
879
@ Cached ("wrapNativeClass(object)" ) PythonClassNativeWrapper wrapper ) {
0 commit comments