[code-reflection] RFR: Remove the code model transformation: addVarsWhenNecessary.

Mourad Abbay mabbay at openjdk.org
Tue Apr 8 16:40:39 UTC 2025


On Tue, 8 Apr 2025 16:09:07 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> It seems to me that, with the exception of `return` we only deal with expressions? I see that we create some intermediate `Exec` nodes (e.g. for array access) but it seems to me that this indirection can be removed in this new code?
>
> It seems to me that, with the exception of `return` we only deal with expressions? I see that we create some intermediate `Exec` nodes (e.g. for array access) but it seems to me that this indirection can be removed in this new code?

Yes, we can map all operations to JCExpression, expect for return. ArrayStoreOp can also be mapped to an expression. I also noticed that we only deal with InvokeOp that has return type different than void, thus then can be mapped to expressions.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/387#discussion_r2033604628


More information about the babylon-dev mailing list