On Mon, 12 Apr 2021 16:24:37 GMT, Jorn Vernee <[email protected]> wrote:
> This patch implements 2 leftover TODOs for implementing var handle invoker MH
> caching (lambda forms for those were already shared/cached).
>
> This piggybacks on the existing mechanism for method handle invoker caching.
>
> Testing: Local testing `java/lang/invoke` tests. Tier 1-3
>
> Thanks,
> Jorn
Looks good.
src/java.base/share/classes/java/lang/invoke/Invokers.java line 131:
> 129: }
> 130:
> 131: private MethodHandle cachedVHInvoker(int idx, VarHandle.AccessMode
> ak) {
You can turn `int idx` parameter into `boolean isExact` and choose base index
depending on its value.
-------------
Marked as reviewed by vlivanov (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3439