src/share/vm/opto/macro.cpp

changeset 2037
e5dfb3ccb88b
parent 1976
6027dddc26c6
child 2314
f95d63e2154a
equal deleted inserted replaced
2018:7139e81efd2d 2037:e5dfb3ccb88b
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();

mercurial