@@ -437,7 +437,7 @@ static Object doSingleton(@SuppressWarnings("unused") CExtContext cextContext, @
437
437
@ Specialization (guards = "object == cachedObject" , limit = "3" , assumptions = "singleContextAssumption()" )
438
438
static Object doPythonClass (@ SuppressWarnings ("unused" ) CExtContext cextContext , @ SuppressWarnings ("unused" ) PythonManagedClass object ,
439
439
@ SuppressWarnings ("unused" ) @ Cached (value = "object" , weak = true ) PythonManagedClass cachedObject ,
440
- @ Cached ("wrapNativeClass(object)" ) PythonClassNativeWrapper wrapper ) {
440
+ @ Cached (value = "wrapNativeClass(object)" , weak = true ) PythonClassNativeWrapper wrapper ) {
441
441
return wrapper ;
442
442
}
443
443
@@ -692,8 +692,8 @@ static Object doSingleton(@SuppressWarnings("unused") CExtContext cextContext, @
692
692
693
693
@ Specialization (guards = "object == cachedObject" , limit = "3" , assumptions = "singleContextAssumption()" )
694
694
static Object doPythonClass (@ SuppressWarnings ("unused" ) CExtContext cextContext , @ SuppressWarnings ("unused" ) PythonManagedClass object ,
695
- @ SuppressWarnings ("unused" ) @ Cached ("object" ) PythonManagedClass cachedObject ,
696
- @ Cached ("wrapNativeClass(object)" ) PythonClassNativeWrapper wrapper ) {
695
+ @ SuppressWarnings ("unused" ) @ Cached (value = "object" , weak = true ) PythonManagedClass cachedObject ,
696
+ @ Cached (value = "wrapNativeClass(object)" , weak = true ) PythonClassNativeWrapper wrapper ) {
697
697
wrapper .increaseRefCount ();
698
698
return wrapper ;
699
699
}
@@ -875,8 +875,8 @@ static Object doSingleton(CExtContext cextContext, PythonAbstractObject object,
875
875
876
876
@ Specialization (guards = "object == cachedObject" , limit = "3" , assumptions = "singleContextAssumption()" )
877
877
static Object doPythonClass (@ SuppressWarnings ("unused" ) CExtContext cextContext , @ SuppressWarnings ("unused" ) PythonManagedClass object ,
878
- @ SuppressWarnings ("unused" ) @ Cached ("object" ) PythonManagedClass cachedObject ,
879
- @ Cached ("wrapNativeClass(object)" ) PythonClassNativeWrapper wrapper ) {
878
+ @ SuppressWarnings ("unused" ) @ Cached (value = "object" , weak = true ) PythonManagedClass cachedObject ,
879
+ @ Cached (value = "wrapNativeClass(object)" , weak = true ) PythonClassNativeWrapper wrapper ) {
880
880
wrapper .increaseRefCount ();
881
881
return wrapper ;
882
882
}
0 commit comments