[code-reflection] RFR: Code transformer [v2]

Paul Sandoz psandoz at openjdk.org
Fri Nov 21 15:53:58 UTC 2025


On Fri, 21 Nov 2025 13:01:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename OpTransformerRename to OpTransformer.
>>   
>>   Update docs.
>
> src/jdk.incubator.code/share/classes/jdk/incubator/code/CodeTransformer.java line 54:
> 
>> 52:          *                    that map to the input operation
>> 53:          */
>> 54:         void acceptOp(Function<Op, Op.Result> builder, Op in, List<Value> outOperands);
> 
> I found the use of `in` and `out` confusing. In the tests I see you just use `op` and `operands` and in my mind that's a bit clearer. Also, the name `OpTransformerRename` feels a bit odd -- isn't this an `OpMapper`? (and the resulting `opTranformer` method a `mapOps` ?

Ooops `OpTransformerRename` was a temporary name to avoid conflicts until renaming to `OpTransformer`, and i wanted to align the naming with `CodeTransformer`. I tweaked the docs, but overall more work is required to properly specify.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/690#discussion_r2550211760


More information about the babylon-dev mailing list