On Mon, 16 Mar 2026 20:47:38 GMT, Chen Liang <[email protected]> wrote:
>> src/hotspot/share/classfile/classFileParser.cpp line 6321:
>>
>>> 6319: }
>>> 6320:
>>> 6321: void ClassFileParser::preload_classes(ConstantPool* cp, TRAPS) {
>>
>> If we check `PreloadClasses` at the call-sites, then just assert
>> `precond(PreloadClasses)` here, might improve the code.
>>
>> or return early if `!PreloadClasses`
>
> I think we can still do a system dictionary lookup and flatten even when
> preloading is not enabled.
In the last commit, the `preload_classes` has been renamed and reworked. A
comment was added to describe the purpose and the strategy of the method. The
PreloadClasses flags controls the class loadings triggered by the
LoadableDescriptors attribute, but not the search into the local system
dictionary because it doesn't trigger class loadings.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2228#discussion_r2947147695