RFR: 8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handles [v2]
Adam Sotona
asotona at openjdk.org
Mon Dec 18 09:16:45 UTC 2023
On Sat, 16 Dec 2023 16:12:05 GMT, Chen Liang <liach at openjdk.org> wrote:
>> 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/InvokerBytecodeGenerator.java line 1171:
>
>> 1169: cob.getfield(ClassDesc.ofInternalName("java/lang/invoke/MethodHandleImpl$CasesHolder"), "cases",
>> 1170: CD_MethodHandle.arrayType());
>> 1171: int casesLocal = extendLocalsMap(new Class<?>[] { MethodHandle[].class });
>
> We should look into replacing the local map with `CodeBuilder.allocateLocal` etc. in the future.
Yes, however actual API does not match directly.
It would require an extension of the API or more significant refactoring of InvokerBytecodeGenerator.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17108#discussion_r1429746763
More information about the core-libs-dev
mailing list