RFR: CSR JVM support for records
Alex Buckley
alex.buckley at oracle.com
Wed Nov 6 18:28:12 UTC 2019
On 11/6/2019 10:14 AM, Harold Seigel wrote:
> Note that the JVM does consistency check the Records attribute at class
> load time, not at first use by reflection. So, perhaps this sentence:
>
> Note that if no reflection is performed then the abstract JVM does
> not care about the Record attribute in any way.
>
> to something like
>
> The format of the record attribute is checked even if no reflection
> is performed.
Given how Record is described in JVMS 4.7 ("each of these attributes
must be recognized and correctly read by an implementation of the Java
Virtual Machine"), it makes sense that the HotSpot JVM is format
checking a Record attribute at load time. So, yes, please make the
change you describe above, and please explicitly compare Record to the
format checking performed for Exceptions, InnerClasses, etc, and
contrast Record with the lack of format checking for MethodParameters,
Module, etc.
Alex
More information about the hotspot-runtime-dev
mailing list