[code-reflection] RFR: Rearrange lowering.

Paul Sandoz psandoz at openjdk.org
Fri Aug 22 17:00:19 UTC 2025


Improve the composition of operation transformations for lowering.

- An operation transformation function can be adapted to lower lowerable operations or copy, thereby we don't have to repeat that logic many times.
- Composing transformer methods are moved to static methods, thereby better handling a null transformer. We compose with a given `OpTransformer` and a `BiFunction<Block.Builder, Op, Block.Builder>` that represents the transformation of operations. 
- The lowerable interface is simplified to just one method
- An initiating lowerable transformation passes a null transformer when lowering a lowerable op.

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

Commit messages:
 - Doc update
 - Doc update.
 - Refactoring.
 - Doc fix.
 - Merge remote-tracking branch 'upstream/code-reflection' into lowering
 - Rearrange lowering.

Changes: https://git.openjdk.org/babylon/pull/529/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=529&range=00
  Stats: 410 lines in 5 files changed: 101 ins; 180 del; 129 mod
  Patch: https://git.openjdk.org/babylon/pull/529.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/529/head:pull/529

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


More information about the babylon-dev mailing list