RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]
John R Rose
jrose at openjdk.org
Tue Mar 4 20:41:11 UTC 2025
On Mon, 24 Feb 2025 23:45:37 GMT, Chen Liang <liach at openjdk.org> wrote:
>> LF editor spins classes, this avoids the spinning overhead and should speed up non-capturing lambdas too.
>>
>> There may need to be additional intrinsic work for MH combinator lf bytecode generation.
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>
> We no longer load DelegateMH as we no longer rebind
I hope that the intrinsic mechanism can be further simplified, at some point. But I defer to Jorn's comments about tableswitch.
Excellent cleanups. Lots and lots of deleted code, and other code regularized. Thank you!
src/java.base/share/classes/java/lang/invoke/SimpleMethodHandle.java line 36:
> 34: * A method handle whose behavior is determined only by its LambdaForm.
> 35: * Access to SimpleMethodHandle should ensure BoundMethodHandle is initialized
> 36: * first.
Did you try factoring UNSAFE.ensureInit(BMH) into a static block in SimpleMethodHandle.java?
Sometimes that works.
-------------
Marked as reviewed by jrose (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23706#pullrequestreview-2658926068
PR Review Comment: https://git.openjdk.org/jdk/pull/23706#discussion_r1980190604
More information about the core-libs-dev
mailing list