RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]

Chen Liang liach at openjdk.org
Sat Dec 16 15:20:41 UTC 2023


On Fri, 15 Dec 2023 12:26:50 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> java.base java.lang.invoke package heavily uses ASM to generate lambdas and method handles.
>> 
>> This patch converts ASM calls to Classfile API.
>> 
>> This PR is continuation of https://github.com/openjdk/jdk/pull/12945
>> 
>> Any comments and suggestions are welcome.
>> 
>> Please review.
>> 
>> Thank you,
>> Adam
>
> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
> 
>   added missing comment

src/java.base/share/classes/java/lang/invoke/TypeConvertingMethodAdapter.java line 67:

> 65: 
> 66:     static private TypeKind primitiveTypeKindFromClass(Class<?> type) {
> 67:         return switch (type.getName().length()) {

We can probably just use an if-chain like that in `sun.invoke.util.Wrapper`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17108#discussion_r1428834792


More information about the core-libs-dev mailing list