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

JSR 292 method handle invocation needs a fast path for compiled code

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b20
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        This is a tracking issue for calls to non-constant method handles to and from "hot" compiled code.

        Internally to the JVM, method handle argument list transformations are implemented on the interpreter stack. This means that when compiled code invokes a method handle with argument transforms, it goes through a C2I adapter, transforms the argument list in interpreted format, and then (presumably) goes through an I2C adapter.

        At least the most important transforms should go through customized code. These include:
        - direct access (no transforms)
        - receiver binding (the bindTo transformation)
        - trivial asType transformations
        - invokeGeneric (argument and return value conversions to and from Object)

        Probably all of the core transforms on MethodHandle virtual methods (not necessarily MethodHandles static methods) should get favorable treatment for compiled-to-compiled calls.

        An important customer is Project Lambda, which should be using method handles in preference to anonymous classes. Getting the above paths right for compiled code will enable this choice.

        Note that this bug does not apply to users invokedynamic, since method handles at invokedynamic call sites are routinely inlined into optimized code.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jrose John Rose
                Reporter:
                jrose John Rose
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: