Class validation cleanups
Dan Smith
daniel.smith at oracle.com
Fri Nov 8 21:04:51 UTC 2019
I've put together some JVMS change proposals to improve its specification of the class validation process, including class loading, format checking, and verification.
These are independent of Valhalla, but lay the groundwork for additional changes to the spec. They address things like:
- How are <init> and <clinit> methods constrained?
- Can array types be field/method receiver types? (Yes, it turns out.)
- When do we enforce the 'final' modifier on classes/methods?
- Which attributes are validated, and when?
- How does class loading handle anomalous situations?
For format checking refinements:
https://bugs.openjdk.java.net/browse/JDK-8233854
http://cr.openjdk.java.net/~dlsmith/class-validation/class-validation-20191107/specs/format-checking-jvms.html
For class loading cleanup:
https://bugs.openjdk.java.net/browse/JDK-8233861
http://cr.openjdk.java.net/~dlsmith/class-validation/class-validation-20191107/specs/class-loading-jvms.html
For attribute validation:
https://bugs.openjdk.java.net/browse/JDK-8233863
http://cr.openjdk.java.net/~dlsmith/class-validation/class-validation-20191107/specs/attribute-validation-jvms.html
The last is the most disruptive, since we're proposing simply ignoring some attribute contents that has traditionally been parsed and validated. I think it may be reasonable to create a JEP for that piece.
More information about the valhalla-spec-observers
mailing list