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

InterfaceMethod_ref should allow invokestatic and invokespecial

XMLWordPrintable

    • b30
    • generic
    • generic

        Per the lambda spec, hotspot now allows interface methods to be static.
        Per the upcoming version (0.6.2) of the lambda spec, these static interface methods are InterfaceMethod_ref. Currently, classFileParser.cpp disallows invokestatic (and invokespecial) calls to InterfaceMethod_ref. Thus these methods cannot be called.

        Below describes the spec:

        ...keep the current restrictions on Methodref_info, and the instruction arguments will be expected as follows:

        invokevirtual(Methodref_info)
        invokeinterface(InterfaceMethoref_info)
        invokespecial(Methodref_info or InterfaceMethodref_info)
        invokestatic(Methodref_info or InterfaceMethodref_info)

        -----
        Please find attached a proposed patch to accomplish this. It is unknown if restrictions will need to be put elsewhere in the VM to compensate for this widening.

          There are no Sub-Tasks for this issue.

              bharadwaj Bharadwaj Yadavalli (Inactive)
              rfield Robert Field (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: