@@ -189,9 +189,9 @@ public static Assumption getSingleContextAssumption() {
189189
190190 @ Specialization (guards = "object == cachedObject" , limit = "1" , assumptions = "singleContextAssumption" )
191191 public static PythonAbstractClass getNativeClassCachedIdentity (PythonAbstractNativeObject object ,
192- @ Shared ("assumption" ) @ Cached (value = "getSingleContextAssumption()" ) Assumption singleContextAssumption ,
193- @ Exclusive @ Cached ("object" ) PythonAbstractNativeObject cachedObject ,
194- @ Exclusive @ Cached ("getNativeClassUncached(cachedObject)" ) PythonAbstractClass cachedClass ) {
192+ @ Shared ("assumption" ) @ Cached (value = "getSingleContextAssumption()" ) Assumption singleContextAssumption ,
193+ @ Exclusive @ Cached ("object" ) PythonAbstractNativeObject cachedObject ,
194+ @ Exclusive @ Cached ("getNativeClassUncached(cachedObject)" ) PythonAbstractClass cachedClass ) {
195195 // TODO: (tfel) is this really something we can do? It's so rare for this class to
196196 // change that it shouldn't be worth the effort, but in native code, anything can
197197 // happen. OTOH, CPython also has caches that can become invalid when someone just
@@ -201,17 +201,17 @@ public static PythonAbstractClass getNativeClassCachedIdentity(PythonAbstractNat
201201
202202 @ Specialization (guards = "cachedObject.equals(object)" , limit = "1" , assumptions = "singleContextAssumption" )
203203 public static PythonAbstractClass getNativeClassCached (PythonAbstractNativeObject object ,
204- @ Shared ("assumption" ) @ Cached (value = "getSingleContextAssumption()" ) Assumption singleContextAssumption ,
205- @ Exclusive @ Cached ("object" ) PythonAbstractNativeObject cachedObject ,
206- @ Exclusive @ Cached ("getNativeClassUncached(cachedObject)" ) PythonAbstractClass cachedClass ) {
204+ @ Shared ("assumption" ) @ Cached (value = "getSingleContextAssumption()" ) Assumption singleContextAssumption ,
205+ @ Exclusive @ Cached ("object" ) PythonAbstractNativeObject cachedObject ,
206+ @ Exclusive @ Cached ("getNativeClassUncached(cachedObject)" ) PythonAbstractClass cachedClass ) {
207207 // TODO same as for 'getNativeClassCachedIdentity'
208208 return cachedClass ;
209209 }
210210
211211 @ Specialization (replaces = {"getNativeClassCached" , "getNativeClassCachedIdentity" })
212212 public static PythonAbstractClass getNativeClass (PythonAbstractNativeObject object ,
213- @ Exclusive @ Cached PCallCapiFunction callGetObTypeNode ,
214- @ Exclusive @ Cached ToJavaNode toJavaNode ) {
213+ @ Exclusive @ Cached PCallCapiFunction callGetObTypeNode ,
214+ @ Exclusive @ Cached ToJavaNode toJavaNode ) {
215215 // do not convert wrap 'object.object' since that is really the native pointer
216216 // object
217217 return (PythonAbstractClass ) toJavaNode .execute (callGetObTypeNode .call (FUN_GET_OB_TYPE , object .getPtr ()));
0 commit comments