[code-reflection] RFR: BytecodeGenerator cleanup and switch support

Adam Sotona asotona at openjdk.org
Mon Dec 1 08:17:53 UTC 2025


- `BytecodeGenerator` performs proprietary lowering transformation
- `OpBuilder` and tests adjusted to do not lower before calling `BytecodeGenerator`
- `BytecodeGenerator.ConstantLabelSwitchOp` is an internal lowered representation of `JavaOp.JavaSwitchOp` with constant labels, and it generates `tableswitch` or `lookupswitch` instruction
- post-processing transformations are slightly refactored

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

Commit messages:
 - switch operand fix
 - nit rename
 - imports reorder
 - imports reorder
 - tableswitch and lookupswitch generation
 - BytecodeGenerator.ConstantLabelSwitchOp work in progress
 - selective lowering in BytecodeGenerator
 - BytecodeGenerator cleanup

Changes: https://git.openjdk.org/babylon/pull/706/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=706&range=00
  Stats: 315 lines in 15 files changed: 176 ins; 93 del; 46 mod
  Patch: https://git.openjdk.org/babylon/pull/706.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/706/head:pull/706

PR: https://git.openjdk.org/babylon/pull/706


More information about the babylon-dev mailing list