changeset 4533:818757f088d3

Fixed signature lookup (unresolved arguments remained unresolved all the time).
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Thu, 09 Feb 2012 10:03:00 +0100
parents 82463023ef62
children 6dda62bf5be4
files graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotSignature.java src/share/vm/graal/graalCompilerToVM.cpp
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotSignature.java	Thu Feb 09 09:04:12 2012 +0100
+++ b/graal/com.oracle.max.graal.hotspot/src/com/oracle/max/graal/hotspot/ri/HotSpotSignature.java	Thu Feb 09 10:03:00 2012 +0100
@@ -122,8 +122,8 @@
             argumentTypes = new RiType[arguments.size()];
         }
         RiType type = argumentTypes[index];
-        if (type == null) {
-            type = compiler.lookupType(arguments.get(index), (HotSpotTypeResolved) accessingClass, false);
+        if (type == null || !(type instanceof RiResolvedType)) {
+            type = compiler.lookupType(arguments.get(index), (HotSpotTypeResolved) accessingClass, true);
             argumentTypes[index] = type;
         }
         return type;
--- a/src/share/vm/graal/graalCompilerToVM.cpp	Thu Feb 09 09:04:12 2012 +0100
+++ b/src/share/vm/graal/graalCompilerToVM.cpp	Thu Feb 09 10:03:00 2012 +0100
@@ -278,7 +278,15 @@
       if (eagerResolve) {
         resolved_type = SystemDictionary::resolve_or_null(nameSymbol, classloader, protectionDomain, THREAD);
       } else {
-        resolved_type = SystemDictionary::find(nameSymbol, classloader, protectionDomain, THREAD);
+        if (FieldType::is_obj(nameSymbol)) {
+          ResourceMark rm(THREAD);
+          // Ignore wrapping L and ;.
+          TempNewSymbol tmp_name = SymbolTable::new_symbol(nameSymbol->as_C_string() + 1,
+                                         nameSymbol->utf8_length() - 2, CHECK_NULL);
+          resolved_type = SystemDictionary::find_instance_or_array_klass(tmp_name, classloader, protectionDomain, THREAD);
+        } else {
+          resolved_type = SystemDictionary::find_instance_or_array_klass(nameSymbol, classloader, protectionDomain, THREAD);
+        }
       }
       if (HAS_PENDING_EXCEPTION) {
         CLEAR_PENDING_EXCEPTION;