[code-reflection] RFR: Transformation API changes

Paul Sandoz psandoz at openjdk.org
Thu Jul 31 22:47:21 UTC 2025


Move transformation of a `Body` starting at a `Block.Builder` to `OpTransformer`, which now has three methods, default method `acceptBody` calls default method `acceptBlock`, which in turn calls abstract method `acceptOp`.

Simplify the body accepting methods on `Block.Builder` which now defer to `OpTransformer.acceptBody`. Those methods are responsible for rebinding the `Block.Builder` and passing the rebound result to `acceptBody`.

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

Commit messages:
 - Remove deferring Block.Builder.body method.
 - Remove comment.
 - Transformation API changes.

Changes: https://git.openjdk.org/babylon/pull/494/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=494&range=00
  Stats: 222 lines in 16 files changed: 64 ins; 42 del; 116 mod
  Patch: https://git.openjdk.org/babylon/pull/494.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/494/head:pull/494

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


More information about the babylon-dev mailing list