Strict field verification
Dan Smith
daniel.smith at oracle.com
Wed Oct 30 03:59:25 UTC 2024
Here's a draft spec for JEP 401 that adds verification rules to ensure that strict instance fields are assigned to before a constructor calls 'super()':
https://cr.openjdk.org/~dlsmith/jep401/jep401-20241030/specs/value-objects-jvms.html
Briefly, this change includes:
- Enhancing the treatment of verification flags to support new kinds of flags
- Defining 'flagFieldUnset' flags for unset strict instance fields
- Enhancing StackMapTable to be able to express these flags
- Removing the flags in 'putfield'
- Ensuring the fields are removed in 'invokespecial'
I'd like to go over it at tomorrow's EG meeting. It's fresh, so I wouldn't be surprised if there are a few bugs! Hopefully it covers all the key new concepts.
More information about the valhalla-spec-observers
mailing list