# HG changeset patch # User kvn # Date 1279904866 25200 # Node ID 12835feea156f3aa8a2b56f8cb67c1809cc55cc6 # Parent 26016b8ed8698490604fcf759cb443e492088f28 6969569: assert(is_static() && is_constant()) failed: illegal call to constant_value() Summary: Add missing is_static guard. Reviewed-by: twisti diff -r 26016b8ed869 -r 12835feea156 hotspot/src/share/vm/ci/ciField.cpp --- a/hotspot/src/share/vm/ci/ciField.cpp Thu Jul 22 15:29:22 2010 -0700 +++ b/hotspot/src/share/vm/ci/ciField.cpp Fri Jul 23 10:07:46 2010 -0700 @@ -339,7 +339,7 @@ if (_type != NULL) _type->print_name(); else tty->print("(reference)"); tty->print(" is_constant=%s", bool_to_str(_is_constant)); - if (_is_constant) { + if (_is_constant && is_static()) { tty->print(" constant_value="); _constant_value.print(); } diff -r 26016b8ed869 -r 12835feea156 hotspot/src/share/vm/opto/macro.cpp --- a/hotspot/src/share/vm/opto/macro.cpp Thu Jul 22 15:29:22 2010 -0700 +++ b/hotspot/src/share/vm/opto/macro.cpp Fri Jul 23 10:07:46 2010 -0700 @@ -720,7 +720,7 @@ if (basic_elem_type == T_OBJECT || basic_elem_type == T_ARRAY) { if (!elem_type->is_loaded()) { field_type = TypeInstPtr::BOTTOM; - } else if (field != NULL && field->is_constant()) { + } else if (field != NULL && field->is_constant() && field->is_static()) { // This can happen if the constant oop is non-perm. ciObject* con = field->constant_value().as_object(); // Do not "join" in the previous type; it doesn't add value,