On Thu, 9 Feb 2023 14:18:56 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> Adam Sotona has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   AttributeElement.Kind removal (#48)
>
> src/java.base/share/classes/jdk/internal/classfile/instruction/CharacterRange.java
>  line 47:
> 
>> 45:      * {@return the start of the instruction range}
>> 46:      */
>> 47:     Label startScope();
> 
> I noticed that this pattern of start/endScope is here, but also in 
> ExceptionCatch, LocalVariable and LocalVariableType. Consider using a common 
> interface for "instructions that are associated with a range".

That is interesting RFE, thanks.

> src/java.base/share/classes/jdk/internal/classfile/instruction/InvokeInstruction.java
>  line 60:
> 
>> 58:      * {@return whether the class holding the method is an interface}
>> 59:      */
>> 60:     boolean isInterface();
> 
> This can also be tested with pattern matching on the MemberRefEntry?

Unfortunately the distinction is dynamic. As of my imagination pattern matching 
is not the best to model interface distinction of `InvokeInstruction`.

-------------

PR: https://git.openjdk.org/jdk/pull/10982

Reply via email to