hotspot/src/share/vm/opto/macro.cpp
changeset 6177 12835feea156
parent 5901 c046f8e9c52b
child 7397 5b173b4ca846
equal deleted inserted replaced
6065:26016b8ed869 6177:12835feea156
   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();