On Thu, 29 Aug 2024 05:01:52 GMT, Shaojin Wen <s...@openjdk.org> wrote:

> This is a large method. By splitting it into multiple methods with the same 
> name, the caller can automatically select based on the different types of 
> parameters, avoiding this large call that cannot be inlined, which can also 
> improve startup performance.
> 
> * current
> 
> CodeBuilder {
>     default CodeBuilder loadConstant(ConstantDesc value) { ... }
> }
> 
> java.lang.classfile.CodeBuilder::loadConstant (465 bytes)   failed to inline: 
> callee is too large

src/java.base/share/classes/java/lang/classfile/CodeBuilder.java line 651:

> 649:     /**
> 650:      * Generate an instruction pushing a constant onto the operand stack
> 651:      * @param value the constant value

Can you change the wording to "pushing an int onto"... "the int value" etc, for 
all int/long/float/double versions of `loadConstant`?

src/java.base/share/classes/java/lang/classfile/CodeBuilder.java line 653:

> 651:      * @param value the constant value
> 652:      * @return this builder
> 653:      * @since 24

Actually we can probably omit the `@since` tags since we will finalize, and 
`CodeBuilder` itself will be `@since 24`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20761#discussion_r1736101900
PR Review Comment: https://git.openjdk.org/jdk/pull/20761#discussion_r1736102662

Reply via email to