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

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Apr 11 09:59:32 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.

Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:

  Address review comments

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

Changes:
  - all: https://git.openjdk.org/babylon/pull/391/files
  - new: https://git.openjdk.org/babylon/pull/391/files/01eacfce..3e5f5b6e

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=babylon&pr=391&range=01
 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=391&range=00-01

  Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 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