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

Customize adapted MethodHandle in MH.invoke() case

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u60, 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b64
    • Verification:
      Not verified

      Backports

        Description

        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}
        }

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: