comparison src/share/vm/opto/macro.cpp @ 1682:e5dfb3ccb88b

6969569: assert(is_static() && is_constant()) failed: illegal call to constant_value() Summary: Add missing is_static guard. Reviewed-by: twisti
author kvn
date Fri, 23 Jul 2010 10:07:46 -0700
parents 6027dddc26c6
children f95d63e2154a
comparison
equal deleted inserted replaced
1663:7139e81efd2d 1682: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();