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

4.10.1.9: Allow invoke{special,static} to invoke a non-<init> interface method

    Details

    • Subcomponent:
      vm

      Description

      JVMS 8 modified the 'invokespecial' and 'invokestatic' instructions so that they can refer to an InterfaceMethodref in the constant pool rather than a (class) Methodref.

      4.10.1.9 was not modified to reflect this enhancement. As a result, the 'instructionIsTypeSafe' rules for these instructions assert "CP = method(...)", implying that the constant pool entry is a Methodref. (See 4.10.1.3 for the definition of 'method', distinct from 'imethod'.)

      This inconsistency is most easily addressed by duplicating the 'instructionIsTypeSafe' rules, adding a 'imethod' variant. We could also modify just the clause, using a parenthesized disjunction; or we could introduce a 'anymethod' rule that encompasses both kinds of constant pool entries.

        Attachments

          Activity

            People

            • Assignee:
              dlsmith Dan Smith
              Reporter:
              dlsmith Dan Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: