RFR: 8365428: Unclear comments on java.lang.invoke Holder classes [v2]
Chen Liang
liach at openjdk.org
Wed Sep 3 03:09:43 UTC 2025
On Sun, 31 Aug 2025 18:18:20 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - Merge branch 'master' of https://github.com/openjdk/jdk into doc/mh-holder-pregen
>> - Ioi reviews
>> - 8365428: Unclear comments on java.lang.invoke Holder classes
>
> src/java.base/share/classes/java/lang/invoke/LambdaForm.java line 143:
>
>> 141:
>> 142: /// Represents the "basic" types that exist in the JVM linkage and stack/locals.
>> 143: /// All subwords (boolean, byte, char, short) are promoted to int.
>
> Existing: a few lines below. I think the `// all primitive types` comment should be deleted.
>
>
> D_TYPE('D', double.class, Wrapper.DOUBLE, TypeKind.DOUBLE), // all primitive types
Done.
> src/java.base/share/classes/java/lang/invoke/LambdaForm.java line 1745:
>
>> 1743: /// ```
>> 1744: /// javap -c -p -v java.lang.invoke.LambdaForm\$Holder
>> 1745: /// ```
>
> Unfortunately, there's currently no way to use `javap` to display the contents of the re-generated version of the Holder classes in an AOT code. You can use `-Xlog:aot+map=trace`, but the information is not very easy to parse.
>
> I filed [JDK-8366485](https://bugs.openjdk.org/browse/JDK-8366485) - Display the contents of generated classes in AOT cache
Sure, I have moved this info to a section specific to image building. We can add the AOT info later.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27010#discussion_r2317640790
PR Review Comment: https://git.openjdk.org/jdk/pull/27010#discussion_r2317641231
More information about the core-libs-dev
mailing list