File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1275,16 +1275,16 @@ public static boolean executeUncached(Object type) {
1275
1275
return InstancesOfTypeHaveWeakrefsNodeGen .getUncached ().execute (null , type );
1276
1276
}
1277
1277
1278
- @ Specialization (guards = "!isNativeObject(type)" )
1279
- static boolean doManaged (Object type ,
1280
- @ Cached (inline = false ) ReadAttributeFromObjectNode read ) {
1281
- return read .execute (type , T___WEAKREF__ ) != PNone .NO_VALUE ;
1282
- }
1283
-
1284
1278
@ Specialization
1285
- static boolean doNative (Node inliningTarget , PythonAbstractNativeObject type ,
1279
+ static boolean check (Node inliningTarget , Object type ,
1280
+ @ Cached NeedsNativeAllocationNode needsNativeAllocationNode ,
1281
+ @ Cached (inline = false ) ReadAttributeFromObjectNode read ,
1286
1282
@ Cached GetWeakListOffsetNode getWeakListOffsetNode ) {
1287
- return getWeakListOffsetNode .execute (inliningTarget , type ) != 0 ;
1283
+ if (needsNativeAllocationNode .execute (inliningTarget , type )) {
1284
+ return getWeakListOffsetNode .execute (inliningTarget , type ) != 0 ;
1285
+ } else {
1286
+ return read .execute (type , T___WEAKREF__ ) != PNone .NO_VALUE ;
1287
+ }
1288
1288
}
1289
1289
}
1290
1290
You can’t perform that action at this time.
0 commit comments