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

InterfaceMethod_ref should allow invokestatic and invokespecial

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b30
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: