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

4.10.1.9: invoke{special,static} can invoke an interface method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8, 9
    • specification
    • vm

      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.

            dlsmith Dan Smith
            dlsmith Dan Smith
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: