8339217: Optimize ClassFile API loadConstant#20761
Conversation
|
👋 Welcome back swen! A progress list of the required criteria for merging this PR into |
|
@wenshao This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 105 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
liach
left a comment
There was a problem hiding this comment.
The primitive overloads of loadConstant avoid extraneous boxing. 👍
Webrevs
|
|
/csr needed |
|
@asotona has indicated that a compatibility and specification (CSR) request is needed for this pull request. @wenshao please create a CSR request for issue JDK-8339217 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
|
@wenshao this pull request can not be integrated into git checkout optim_classfile_loadconstant_2020408
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
I have updated the CSR with your latest specs. |
…oadconstant_2020408 # Conflicts: # src/java.base/share/classes/java/lang/classfile/CodeBuilder.java
…oadconstant_2020408 # Conflicts: # src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
|
|
||
|
|
||
| /** | ||
| * Generate an instruction pushing a constant int value onto the operand stack. |
There was a problem hiding this comment.
@wenshao After offline discussion with @kevinb9n, we think we should add another sentence in the API specification:
This is identical to {@link #loadConstant(ConstantDesc) loadConstant(Integer.valueOf(value))}.
And repeat this for long, float, and double versions (with Long.valueOf(value) etc.)
This avoids confusions around this API.
|
/integrate |
|
Going to push as commit 2461263.
Your commit was automatically rebased without conflicts. |
|
The CSR asks to use |
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.
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20761/head:pull/20761$ git checkout pull/20761Update a local copy of the PR:
$ git checkout pull/20761$ git pull https://git.openjdk.org/jdk.git pull/20761/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20761View PR using the GUI difftool:
$ git pr show -t 20761Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20761.diff
Webrev
Link to Webrev Comment