hotspot/src/share/vm/ci/ciObjArrayKlass.cpp
changeset 13952 e3cf184080bc
parent 13728 882756847a04
child 20702 bbe0fcde6e13
equal deleted inserted replaced
13918:b01a48301e67 13952:e3cf184080bc
    30 #include "oops/objArrayKlass.hpp"
    30 #include "oops/objArrayKlass.hpp"
    31 
    31 
    32 // ciObjArrayKlass
    32 // ciObjArrayKlass
    33 //
    33 //
    34 // This class represents a Klass* in the HotSpot virtual machine
    34 // This class represents a Klass* in the HotSpot virtual machine
    35 // whose Klass part is an objArrayKlass.
    35 // whose Klass part is an ObjArrayKlass.
    36 
    36 
    37 // ------------------------------------------------------------------
    37 // ------------------------------------------------------------------
    38 // ciObjArrayKlass::ciObjArrayKlass
    38 // ciObjArrayKlass::ciObjArrayKlass
    39 //
    39 //
    40 // Constructor for loaded object array klasses.
    40 // Constructor for loaded object array klasses.
    41 ciObjArrayKlass::ciObjArrayKlass(KlassHandle h_k) : ciArrayKlass(h_k) {
    41 ciObjArrayKlass::ciObjArrayKlass(KlassHandle h_k) : ciArrayKlass(h_k) {
    42   assert(get_Klass()->oop_is_objArray(), "wrong type");
    42   assert(get_Klass()->oop_is_objArray(), "wrong type");
    43   Klass* element_Klass = get_objArrayKlass()->bottom_klass();
    43   Klass* element_Klass = get_ObjArrayKlass()->bottom_klass();
    44   _base_element_klass = CURRENT_ENV->get_klass(element_Klass);
    44   _base_element_klass = CURRENT_ENV->get_klass(element_Klass);
    45   assert(_base_element_klass->is_instance_klass() ||
    45   assert(_base_element_klass->is_instance_klass() ||
    46          _base_element_klass->is_type_array_klass(), "bad base klass");
    46          _base_element_klass->is_type_array_klass(), "bad base klass");
    47   if (dimension() == 1) {
    47   if (dimension() == 1) {
    48     _element_klass = _base_element_klass;
    48     _element_klass = _base_element_klass;
    81   if (_element_klass == NULL) {
    81   if (_element_klass == NULL) {
    82     assert(dimension() > 1, "_element_klass should not be NULL");
    82     assert(dimension() > 1, "_element_klass should not be NULL");
    83     // Produce the element klass.
    83     // Produce the element klass.
    84     if (is_loaded()) {
    84     if (is_loaded()) {
    85       VM_ENTRY_MARK;
    85       VM_ENTRY_MARK;
    86       Klass* element_Klass = get_objArrayKlass()->element_klass();
    86       Klass* element_Klass = get_ObjArrayKlass()->element_klass();
    87       _element_klass = CURRENT_THREAD_ENV->get_klass(element_Klass);
    87       _element_klass = CURRENT_THREAD_ENV->get_klass(element_Klass);
    88     } else {
    88     } else {
    89       VM_ENTRY_MARK;
    89       VM_ENTRY_MARK;
    90       // We are an unloaded array klass.  Attempt to fetch our
    90       // We are an unloaded array klass.  Attempt to fetch our
    91       // element klass by name.
    91       // element klass by name.