[code-reflection] RFR: Replace the use of Interpreter to create Quoted instance with specialized code [v13]
Paul Sandoz
psandoz at openjdk.org
Tue Jun 3 14:58:05 UTC 2025
On Tue, 3 Jun 2025 11:04:21 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add error messages
>
> src/jdk.incubator.code/share/classes/jdk/incubator/code/op/CoreOp.java line 4478:
>
>> 4476: }
>> 4477:
>> 4478: public static OpAndValues quotedOp(FuncOp funcOp) {
>
> I'm a bit confused here as to what is the rationale for splitting this operation into two - e.g. this returns `OpAndValues` -- which contains the quoted op returned by `funcOp`, plus the values captured by the `funcOp` body, which are the parameters of `funcOp`, plus any captured value. Then we need to adapt this `OpAndValues` so that when we know what the array of actual captured values is, we create new operands that point to these values -- we do this in `QuotedHelper`. Why can't the two steps be merged (e.g. have `quotedOp` also take an `Object[]` array and return a `Quoted`) ? Do we have use cases where we expect to do one step w/o the other?
I wanted to ensure both methods are purely symbolic, given their current location. Perhaps they would be better located on `Quoted`? Then we can lean into returning a `Quoted` instance and `QuotedHelper` can be removed.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/424#discussion_r2124128088
More information about the babylon-dev
mailing list