Request for reviews (XS): 6969569: assert(is_static() && is_constant()) failed: illegal call to constant_value()

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Jul 23 09:51:49 PDT 2010


The evaluation and suggested fix were done by John.

http://cr.openjdk.java.net/~kvn/6969569/webrev

Fixed 6969569: assert(is_static() && is_constant()) failed: illegal call to constant_value()

All callers of ciField::constant_value must be guarded by
both is_constant and is_static. For non-static fields,
the correct accessor is ciField::constant_value_of.

PhaseMacroExpand::scalar_replacement() and ciField::print()
have a missing is_static guard.

Solution:
Add missing is_static guard.

Tested with failed case and JPRT.


More information about the hotspot-compiler-dev mailing list