babylon
babylon copied to clipboard
BytecodeGenerator cleanup and switch support
BytecodeGeneratorperforms proprietary lowering transformationOpBuilderand tests adjusted to do not lower before callingBytecodeGeneratorBytecodeGenerator.ConstantLabelSwitchOpis an internal lowered representation ofJavaOp.JavaSwitchOpwith constant labels, and it generatestableswitchorlookupswitchinstruction- post-processing transformations are slightly refactored
Progress
- [x] Change must not contain extraneous whitespace
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/babylon.git pull/706/head:pull/706
$ git checkout pull/706
Update a local copy of the PR:
$ git checkout pull/706
$ git pull https://git.openjdk.org/babylon.git pull/706/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 706
View PR using the GUI difftool:
$ git pr show -t 706
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/babylon/pull/706.diff
:wave: Welcome back asotona! A progress list of the required criteria for merging this PR into code-reflection will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
@asotona 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:
BytecodeGenerator cleanup and switch support
Co-authored-by: Mourad Abbay <[email protected]>
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 20 new commits pushed to the code-reflection branch:
- d5fff759a1257af70d648e3ae006edb3a39ed63d: [hat] bfloat16 codegen for C99 conversion fixed
- eff881e1f9c145823340f01e30d1262db94122e4: Fix issues with local class creation from reflectable constructs
- 398893b37edab24e5da46acb2f76f6ebe1fe1f7a: Simplify C99 codegen
- ... and 17 more: https://git.openjdk.org/babylon/compare/a6a9d903b8dcfb6c134db47edc55a6366b5cbca0...code-reflection
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 code-reflection branch, type /integrate in a new comment.
Webrevs
- 13: Full - Incremental (82c75258)
- 12: Full - Incremental (811f061a)
- 11: Full - Incremental (d8f88d64)
- 10: Full - Incremental (d6821ba3)
- 09: Full - Incremental (12c3eb91)
- 08: Full - Incremental (2994865c)
- 07: Full - Incremental (ffb5442c)
- 06: Full - Incremental (0fe1d1f5)
- 05: Full - Incremental (13eceb2c)
- 04: Full - Incremental (b9a75e2c)
- 03: Full - Incremental (98235aff)
- 02: Full - Incremental (a2753cba)
- 01: Full - Incremental (abff6609)
- 00: Full (d5c550cb)
⚠️ @asotona This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).
/contributor add @mabbay
@asotona
Contributor Mourad Abbay <[email protected]> successfully added.
@mabbay The custom lowering transformation is probably worth to take out of the BytecodeGenerator into a standalone class in the jdk.incubator.code.bytecode.impl package.
@mabbay Nice fix of the default case lowering.
@mcimadamore I think the detection of the default case body by the constant true is good enough for now and we may refine it later as needed (either by a custom DefaultLabelOp, or by storing its index into an attribute, or any other way).
Thank you for all the reviews. Unresolved comments will be solved in a follow-up PR. /integrate
/integrate
Going to push as commit 832efca9d9e2769118226c532af5e2fc17eb8ba5.
Since your change was applied there have been 20 commits pushed to the code-reflection branch:
- d5fff759a1257af70d648e3ae006edb3a39ed63d: [hat] bfloat16 codegen for C99 conversion fixed
- eff881e1f9c145823340f01e30d1262db94122e4: Fix issues with local class creation from reflectable constructs
- 398893b37edab24e5da46acb2f76f6ebe1fe1f7a: Simplify C99 codegen
- ... and 17 more: https://git.openjdk.org/babylon/compare/a6a9d903b8dcfb6c134db47edc55a6366b5cbca0...code-reflection
Your commit was automatically rebased without conflicts.
@asotona Pushed as commit 832efca9d9e2769118226c532af5e2fc17eb8ba5.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.
@asotona The command integrate can only be used in open pull requests.