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

Adam Sotona asotona at openjdk.org
Mon Jun 17 12:46:17 UTC 2024


On Thu, 6 Jun 2024 12:13:44 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - reverted static initialization of ConstantPoolBuilder and CP entries
>>  - fixed naming conventions
>
> src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java line 784:
> 
>> 782:                             // mix them up and load them for the transform helper:
>> 783:                             List<Var> helperArgs = speciesData.deriveTransformHelperArguments(transformMethods.get(whichtm), whichtm, targs, tfields);
>> 784:                             List<Class<?>> helperTypes = new ArrayList<>(helperArgs.size());
> 
> Can we convert helperTypes here to List<ClassDesc> so we construct invokeBasicType as MethodTypeDesc below?

This part can be simplified to a directly used validated array of ClassDesc and many conversions can be skipped.

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

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


More information about the core-libs-dev mailing list