[code-reflection] RFR: Test remove final vars

Mourad Abbay mabbay at openjdk.org
Wed Mar 20 02:26:29 UTC 2024


On Thu, 15 Feb 2024 19:32:03 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> A transformation to remove final vars, it serves as an example on how to use the API to write transformations.
>
> test/jdk/java/lang/reflect/code/TestRemoveFinalVars.java line 39:
> 
>> 37: 
>> 38:         FuncOp f2 = f.transform(TestRemoveFinalVars::rmFinalVars);
>> 39:         f2.writeTo(System.out);
> 
> We should assert on the resulting model or run through the interpreter. I suspect the result of your transformation would result in the same structure as the one produced by `SSA.transform`.

Because we only remove final and effectively final variables, and SSA remove all variables, the result will be different.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/25#discussion_r1531449433


More information about the babylon-dev mailing list