hotspot/src/share/vm/ci/ciObjArrayKlass.cpp
changeset 20702 bbe0fcde6e13
parent 13952 e3cf184080bc
child 22234 da823d78ad65
--- a/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp	Wed Oct 09 11:05:17 2013 -0700
+++ b/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp	Wed Oct 09 16:32:21 2013 +0200
@@ -179,3 +179,16 @@
 ciObjArrayKlass* ciObjArrayKlass::make(ciKlass* element_klass) {
   GUARDED_VM_ENTRY(return make_impl(element_klass);)
 }
+
+ciKlass* ciObjArrayKlass::exact_klass() {
+  ciType* base = base_element_type();
+  if (base->is_instance_klass()) {
+    ciInstanceKlass* ik = base->as_instance_klass();
+    if (ik->exact_klass() != NULL) {
+      return this;
+    }
+  } else if (base->is_primitive_type()) {
+    return this;
+  }
+  return NULL;
+}