-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 8, 9
-
Component/s: specification
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.
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.
- relates to
-
JDK-8323557 4.10.1: clarify distinction between types and classes
-
- Resolved
-
-
JDK-8350029 Illegal invokespecial interface not caught by verification
-
- Resolved
-
-
JDK-8349179 4.10.1.9 invokespecial: rewrittenUninitializedType has wrong result type
-
- Resolved
-