On Wed, 28 Aug 2024 04:14:53 GMT, Shaojin Wen <s...@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);

src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java 
line 1479:

> 1477: 
> 1478:     @Override
> 1479:     public CodeBuilder iload(int slot) {

Can you put them in the same order they are declared in `CodeBuilder`, like 
`iload` between `iinc` and `imul`?

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

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

Reply via email to