Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8078290

Customize adapted MethodHandle in MH.invoke() case

XMLWordPrintable

    • b64
    • Not verified

        Customize adapted MethodHandle in MH.invoke() case.

        Right now, generic invoker LambdaForm looks like:
        invoke_002_MT=Lambda(a0:L,a1:L,a2:L)=>{
            t3:L=Invokers.checkGenericType(a0:L,a2:L);
            t4:V=Invokers.checkCustomized(a0:L);
            t5:L=MethodHandle.invokeBasic(t3:L,a1:L);t5:L}
        }
        Customize a0, but invoke t3. a0 != t3 when asType conversion happens.

        Should be:
        Generic invoker LambdaForm should be:
        invoke_002_MT=Lambda(a0:L,a1:L,a2:L)=>{
            t3:L=Invokers.checkGenericType(a0:L,a2:L);
            t4:V=Invokers.checkCustomized(t3:L);
            t5:L=MethodHandle.invokeBasic(t3:L,a1:L);t5:L}
        }

              vlivanov Vladimir Ivanov
              vlivanov Vladimir Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: