hotspot/src/share/vm/ci/ciEnv.cpp
changeset 26944 d515f86283be
parent 26796 666464578742
child 27420 04e6f914cce1
--- a/hotspot/src/share/vm/ci/ciEnv.cpp	Wed Oct 01 09:40:43 2014 +0000
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp	Wed Oct 01 12:34:38 2014 -0700
@@ -580,7 +580,12 @@
     oop obj = cpool->resolved_references()->obj_at(cache_index);
     if (obj != NULL) {
       ciObject* ciobj = get_object(obj);
-      return ciConstant(T_OBJECT, ciobj);
+      if (ciobj->is_array()) {
+        return ciConstant(T_ARRAY, ciobj);
+      } else {
+        assert(ciobj->is_instance(), "should be an instance");
+        return ciConstant(T_OBJECT, ciobj);
+      }
     }
     index = cpool->object_to_cp_index(cache_index);
   }
@@ -607,8 +612,12 @@
       }
     }
     ciObject* constant = get_object(string);
-    assert (constant->is_instance(), "must be an instance, or not? ");
-    return ciConstant(T_OBJECT, constant);
+    if (constant->is_array()) {
+      return ciConstant(T_ARRAY, constant);
+    } else {
+      assert (constant->is_instance(), "must be an instance, or not? ");
+      return ciConstant(T_OBJECT, constant);
+    }
   } else if (tag.is_klass() || tag.is_unresolved_klass()) {
     // 4881222: allow ldc to take a class type
     ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore_will_link, accessor);