RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v16]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon May 8 10:49:26 UTC 2023
On Mon, 8 May 2023 09:32:31 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove assertion, no longer true with teleport definition in MHP
>
> src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java line 342:
>
>> 340:
>> 341: // individual handle fields
>> 342: clb.withField(ORIGINAL_TARGET_NAME, CD_MethodHandle, ACC_PRIVATE | ACC_FINAL);
>
> Would a @Stable field help here? E.g if the returned functional interface instance is stored in a `static final` field, it should enable better performance?
(actually, not sure - as the class is saved in a class value cache, so probably adding stable won't make any difference).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13197#discussion_r1187300990
More information about the core-libs-dev
mailing list