RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v5]

ExE Boss duke at openjdk.org
Sat Dec 23 15:27:47 UTC 2023


On Sat, 23 Dec 2023 12:40:33 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   minor StackCounter fix
>
> src/java.base/share/classes/jdk/internal/classfile/impl/StackCounter.java line 49:
> 
>> 47:                 dcb,
>> 48:                 dcb.methodInfo.methodName(),
>> 49:                 dcb.methodInfo.methodType(),
> 
> Can you enlighten me on why this actually leads to a performance improvement? Don't we already generate the methods with MethodTypeDesc symbols in ProxyGenerator so that they should be cached?

This code is part of the **ClassFile API**’s internals, and so it doesn’t have access to `ProxyGenerator`’s cached `MethodTypeDesc`s, only the underlying `Utf8Entry`, so it’d need to be parsed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17121#discussion_r1435630982


More information about the core-libs-dev mailing list