# HG changeset patch # User Doug Simon # Date 1405869004 -7200 # Node ID adafceb4da4ada57a3b263ff5587fec11508717b # Parent 042b5e9aeb763d398197e4c4ad5564b8b18bad4f improved name and documentation for method implementing fast-path check for type resolution diff -r 042b5e9aeb76 -r adafceb4da4a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java Fri Jul 18 14:28:43 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectType.java Sun Jul 20 17:10:04 2014 +0200 @@ -712,13 +712,13 @@ } /** - * Determines if this type is resolved in the context of a given accessing class. This is a - * conservative check based on this type's class loader being identical to - * {@code accessingClass}'s loader. This type may still be the correct resolved type in the - * context of {@code accessingClass} if its loader is an ancestor of {@code accessingClass}'s - * loader. + * Performs a fast-path check that this type is resolved in the context of a given accessing + * class. A negative result does not mean this type is not resolved with respect to + * {@code accessingClass}. That can only be determined by + * {@linkplain HotSpotGraalRuntime#lookupType(String, HotSpotResolvedObjectType, boolean) + * re-resolving} the type. */ - public boolean isResolvedWithRespectTo(ResolvedJavaType accessingClass) { + public boolean isDefinitelyResolvedWithRespectTo(ResolvedJavaType accessingClass) { assert accessingClass != null; ResolvedJavaType elementType = getElementalType(); if (elementType.isPrimitive()) { @@ -738,7 +738,7 @@ @Override public ResolvedJavaType resolve(ResolvedJavaType accessingClass) { - if (isResolvedWithRespectTo(requireNonNull(accessingClass))) { + if (isDefinitelyResolvedWithRespectTo(requireNonNull(accessingClass))) { return this; } HotSpotResolvedObjectType accessingType = (HotSpotResolvedObjectType) accessingClass; diff -r 042b5e9aeb76 -r adafceb4da4a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSignature.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSignature.java Fri Jul 18 14:28:43 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSignature.java Sun Jul 20 17:10:04 2014 +0200 @@ -134,7 +134,7 @@ } if (type instanceof HotSpotResolvedObjectType) { - return ((HotSpotResolvedObjectType) type).isResolvedWithRespectTo(accessingClass); + return ((HotSpotResolvedObjectType) type).isDefinitelyResolvedWithRespectTo(accessingClass); } return true; }