On Mon, 2 Oct 2023 13:50:56 GMT, Maurizio Cimadamore <[email protected]>
wrote:
>> src/java.base/share/classes/java/lang/classfile/instruction/InvokeInstruction.java
>> line 67:
>>
>>> 65:
>>> 66: /**
>>> 67: * {@return for an {@code invokeinterface}, the {@code count}
>>> value, as defined in {@jvms 6.5}}
>>
>> Suggestion:
>>
>> * {@return the {@code count} value of an {@code invokeinterface}
>> instruction, as defined in {@jvms 6.5}}
>
> What does this return for something that is not `invokeinterface` ? Do we
> infer the count from the descriptor? Or do we return -1 ? This should
> probably be reflected in the javadoc.
Return value for other invoke instructions was inconsistent across
implementations.
I've unified them to return 0 and mentioned it in the javadoc.
Thanks for pointing it out, good catch.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15706#discussion_r1344039936