equal
deleted
inserted
replaced
718 const Type *field_type; |
718 const Type *field_type; |
719 // The next code is taken from Parse::do_get_xxx(). |
719 // The next code is taken from Parse::do_get_xxx(). |
720 if (basic_elem_type == T_OBJECT || basic_elem_type == T_ARRAY) { |
720 if (basic_elem_type == T_OBJECT || basic_elem_type == T_ARRAY) { |
721 if (!elem_type->is_loaded()) { |
721 if (!elem_type->is_loaded()) { |
722 field_type = TypeInstPtr::BOTTOM; |
722 field_type = TypeInstPtr::BOTTOM; |
723 } else if (field != NULL && field->is_constant()) { |
723 } else if (field != NULL && field->is_constant() && field->is_static()) { |
724 // This can happen if the constant oop is non-perm. |
724 // This can happen if the constant oop is non-perm. |
725 ciObject* con = field->constant_value().as_object(); |
725 ciObject* con = field->constant_value().as_object(); |
726 // Do not "join" in the previous type; it doesn't add value, |
726 // Do not "join" in the previous type; it doesn't add value, |
727 // and may yield a vacuous result if the field is of interface type. |
727 // and may yield a vacuous result if the field is of interface type. |
728 field_type = TypeOopPtr::make_from_constant(con)->isa_oopptr(); |
728 field_type = TypeOopPtr::make_from_constant(con)->isa_oopptr(); |