changeset 7040:fdcdbc3dd76c

HotSpotSignature.getParameterType should not try eager resolving. HotSpotSignature.getReturnType should try resolving again if the cache holds an unresolved type
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 27 Nov 2012 11:08:02 +0100
parents 52c88c405d07
children d730d8febfcf
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSignature.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSignature.java	Mon Nov 26 19:30:54 2012 -0800
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSignature.java	Tue Nov 27 11:08:02 2012 +0100
@@ -117,7 +117,7 @@
         }
         JavaType type = argumentTypes[index];
         if (type == null || !(type instanceof ResolvedJavaType)) {
-            type = HotSpotGraalRuntime.getInstance().lookupType(arguments.get(index), (HotSpotResolvedJavaType) accessingClass, true);
+            type = HotSpotGraalRuntime.getInstance().lookupType(arguments.get(index), (HotSpotResolvedJavaType) accessingClass, false);
             argumentTypes[index] = type;
         }
         return type;
@@ -134,7 +134,7 @@
 
     @Override
     public JavaType getReturnType(ResolvedJavaType accessingClass) {
-        if (returnTypeCache == null) {
+        if (returnTypeCache == null || !(returnTypeCache instanceof ResolvedJavaType)) {
             returnTypeCache = HotSpotGraalRuntime.getInstance().lookupType(returnType, (HotSpotResolvedJavaType) accessingClass, false);
         }
         return returnTypeCache;