[code-reflection] RFR: Improve resolution of types in `CodeModelToAST`

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Apr 10 11:43:28 UTC 2025


The `CodeModelToAST` class features an ad-hoc table of types, which is hard-wired to include all the types that can come up in the code model generated by `OpBuilder`.
This approach is fragile (if new types are relied upon by `OpBuilder`, they need to be added there), and duplicates type resolution tables that javac has to maintain anyway.

This PR replaces the ad-hoc type table with more idiomatic javac type lookup logic.

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

Commit messages:
 - Initial push

Changes: https://git.openjdk.org/babylon/pull/391/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=391&range=00
  Stats: 64 lines in 1 file changed: 8 ins; 52 del; 4 mod
  Patch: https://git.openjdk.org/babylon/pull/391.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/391/head:pull/391

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


More information about the babylon-dev mailing list