Loading... (original) (raw)

Consider adding verification of stable property for fields into VM.
@Stable means that all component variables of an annotated field changes value at most once.
It means that only (0/NULL) => (non-0/non-NULL) transitions are allowed for all components of a stable field.

There's a prototype implementation for template interpreter (for x86-64, primitive or reference fields are only supported): http://cr.openjdk.java.net/~vlivanov/8001107/assert.00/

relates to

New Feature - A new feature of the product, which has yet to be developed. JDK-8001107 @Stable annotation for constant folding of lazily evaluated variables

Enhancement - null JDK-8233873 final field values should be trusted as constant

Bug - A problem which impairs or prevents the functions of the product. JDK-8295486 Inconsistent constant field values observed during compilation