[code-reflection] RFR: Dialect factory

Paul Sandoz psandoz at openjdk.org
Mon Jun 16 19:31:24 UTC 2025


Group op factory and type element factory into dialect factory record.

The synthetic method added by javac to build a code model now has no parameters. The dialect factory, namely that for Java ops and type elements, is accessed from within the generated method body. This simplifies the connections between compiler/runtime and code reflection (see the reduction in `CodeReflectionSymbols.java` and `InnerClassLambdaMetafactory.java`).

The synthetic method's accessibility is now private, as is the synthetic method to access the quoted instance from a quotable lambda's functional interface implementation.

Further alignment of the factories and their use will occur in one or more subsequent PRs.

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

Commit messages:
 - Simplify
 - Access control and docs
 - Clean ups and docs.
 - Clean up imports
 - Remove dialect factory parameter.
 - Group op and type elem factory into dialect record

Changes: https://git.openjdk.org/babylon/pull/441/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=441&range=00
  Stats: 199 lines in 11 files changed: 69 ins; 80 del; 50 mod
  Patch: https://git.openjdk.org/babylon/pull/441.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/441/head:pull/441

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


More information about the babylon-dev mailing list