RFR: 8291360: Create entry points to expose low-level class file information
David Holmes
dholmes at openjdk.org
Sat Jul 30 07:50:19 UTC 2022
On Fri, 29 Jul 2022 21:19:27 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> src/hotspot/share/prims/jvm.cpp line 4059:
>>
>>> 4057: return JVM_CLASSFILE_MAJOR_VERSION;
>>> 4058: }
>>> 4059: assert(!java_lang_Class::as_Klass(mirror)->is_array_klass(), "unexpected array class");
>>
>> Can this throw IllegalArgumentException instead.
>> Asserts only report problems when built with debug (Right?)
>
> Or, Can the VM do this traversal as/more efficiently than doing at the java level?
It is usual for the Java code to do such checks and throw exceptions, so that the VM assumes it is correct and only asserts incase something has been missed on the Java side.
-------------
PR: https://git.openjdk.org/jdk/pull/9688
More information about the build-dev
mailing list