@@ -189,9 +189,9 @@ public static Assumption getSingleContextAssumption() {
189
189
190
190
@ Specialization (guards = "object == cachedObject" , limit = "1" , assumptions = "singleContextAssumption" )
191
191
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 ) {
195
195
// TODO: (tfel) is this really something we can do? It's so rare for this class to
196
196
// change that it shouldn't be worth the effort, but in native code, anything can
197
197
// happen. OTOH, CPython also has caches that can become invalid when someone just
@@ -201,17 +201,17 @@ public static PythonAbstractClass getNativeClassCachedIdentity(PythonAbstractNat
201
201
202
202
@ Specialization (guards = "cachedObject.equals(object)" , limit = "1" , assumptions = "singleContextAssumption" )
203
203
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 ) {
207
207
// TODO same as for 'getNativeClassCachedIdentity'
208
208
return cachedClass ;
209
209
}
210
210
211
211
@ Specialization (replaces = {"getNativeClassCached" , "getNativeClassCachedIdentity" })
212
212
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 ) {
215
215
// do not convert wrap 'object.object' since that is really the native pointer
216
216
// object
217
217
return (PythonAbstractClass ) toJavaNode .execute (callGetObTypeNode .call (FUN_GET_OB_TYPE , object .getPtr ()));
0 commit comments