On Mon, 2 Sep 2024 13:02:40 GMT, Chen Liang <li...@openjdk.org> wrote:

>> BytecodeHelpers' loadOpcode and storeOpcode are large methods with code size 
>> greater than 325, break it into multiple small methods and call them 
>> directly in DirectCodeBuilder
>
> src/java.base/share/classes/jdk/internal/classfile/impl/BytecodeHelpers.java 
> line 61:
> 
>> 59:         return switch (tk) {
>> 60:             case INT, SHORT, BYTE, CHAR, BOOLEAN
>> 61:                            -> iload(slot);
> 
> Can you do
> 
> switch (tk.asLoadable()) {
>     case INT      -> iload(slot);

I'm not sure if that's better, because there's a getField and branch in the 
implementation of asLoadable

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20739#discussion_r1740969683

Reply via email to