RFR: 8339217: Optimize ClassFile API loadConstant [v6]

Adam Sotona asotona at openjdk.org
Mon Sep 16 13:48:11 UTC 2024


On Sat, 14 Sep 2024 02:45:47 GMT, Shaojin Wen <swen at 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
>
> Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix comments

Looks good to me.

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

Marked as reviewed by asotona (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20761#pullrequestreview-2306720423


More information about the core-libs-dev mailing list