[code-reflection] Integrated: Hat make all c99 and java code builders scope aware
Gary Frost
gfrost at openjdk.org
Thu Jan 15 15:08:12 UTC 2026
Previously Java and C99 code builders had to pass a ScopedBuildContext to some calls to resolve vars (they resolve differenlly depending on whether we are building a for loop, or an iff block.
Here we have made all Java and C99 code builders scope aware. So we don't have to pass the scope builders around.
This temporarily made building schemas more versbose (we have to make a scope builder available when building, but this should really be a no-op for just creating typedefs), I will come back (next PR) and fix this.
I also adde scope resolution for lambda's so we can properly reify lambdas in the JavaCodeBuilder.
Sorry this code touched a lot of files.
-------------
Commit messages:
- Removed need for passing CodeBuilderContext during code gen
- Stage one. Create specific abstract ScopeAware builder classes
Changes: https://git.openjdk.org/babylon/pull/847/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=847&range=00
Stats: 672 lines in 36 files changed: 175 ins; 46 del; 451 mod
Patch: https://git.openjdk.org/babylon/pull/847.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/847/head:pull/847
PR: https://git.openjdk.org/babylon/pull/847
More information about the babylon-dev
mailing list