[code-reflection] RFR: Captured constants in variables

Paul Sandoz psandoz at openjdk.org
Mon Oct 7 19:39:56 UTC 2024


On Mon, 7 Oct 2024 19:34:44 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

> Tweak the modeling of captured constants to model as variables initialized with the constants. This makes the modeling more uniform and preserves the variable name. Which in turn fixes an issue in HAT that relies on this uniformity.

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ReflectMethods.java line 548:

> 546:             for (int i = 0 ; i < capturedSymbols.size() ; i++) {
> 547:                 Symbol capturedSymbol = capturedSymbols.get(i);
> 548:                 var capturedArg = top.block.parameters().get(blockParamOffset + i);

Cosmetic change to be consistent with the next loop.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/250#discussion_r1790772696


More information about the babylon-dev mailing list