< prev index next >

src/share/vm/ci/ciArrayKlass.cpp

Print this page

        

*** 25,34 **** --- 25,35 ---- #include "precompiled.hpp" #include "ci/ciArrayKlass.hpp" #include "ci/ciObjArrayKlass.hpp" #include "ci/ciTypeArrayKlass.hpp" #include "ci/ciUtilities.hpp" + #include "ci/ciValueArrayKlass.hpp" // ciArrayKlass // // This class represents a Klass* in the HotSpot virtual machine // whose Klass part in an ArrayKlass.
*** 57,67 **** // What type is obtained when this array is indexed once? ciType* ciArrayKlass::element_type() { if (is_type_array_klass()) { return ciType::make(as_type_array_klass()->element_type()); } else { ! return as_obj_array_klass()->element_klass()->as_klass(); } } // ------------------------------------------------------------------ --- 58,68 ---- // What type is obtained when this array is indexed once? ciType* ciArrayKlass::element_type() { if (is_type_array_klass()) { return ciType::make(as_type_array_klass()->element_type()); } else { ! return element_klass()->as_klass(); } } // ------------------------------------------------------------------
*** 97,105 **** --- 98,108 ---- // // What type is obtained when this array is indexed as many times as possible? ciArrayKlass* ciArrayKlass::make(ciType* element_type) { if (element_type->is_primitive_type()) { return ciTypeArrayKlass::make(element_type->basic_type()); + } else if (element_type->is_valuetype() && element_type->as_value_klass()->flatten_array()) { + return ciValueArrayKlass::make(element_type->as_klass()); } else { return ciObjArrayKlass::make(element_type->as_klass()); } }
< prev index next >