RFR: 8339217: Optimize ClassFile API loadConstant [v2]

Shaojin Wen swen at openjdk.org
Thu Aug 29 15:35:32 UTC 2024


> 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 comment

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/20761/files
  - new: https://git.openjdk.org/jdk/pull/20761/files/e24ae903..46f10606

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20761&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20761&range=00-01

  Stats: 8 lines in 1 file changed: 0 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/20761.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20761/head:pull/20761

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


More information about the core-libs-dev mailing list