[code-reflection] RFR: Replace the use of Interpreter to create Quoted instance with specialized code [v13]
Mourad Abbay
mabbay at openjdk.org
Wed Jun 4 00:23:36 UTC 2025
On Mon, 2 Jun 2025 21:29:52 GMT, Paul Sandoz <psandoz 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 4531:
>
>> 4529: throw new IllegalArgumentException("Block parameter not an operand nor a captured value");
>> 4530: }
>> 4531: }
>
> I think it would be clearer to check up front that all block parameters are used only once to initialize a var op declared in the function's entry block, and further the var op's result is used. This should simplify the checking of all operations but the last two, since the main focus is then on var op initialized by constant op, and you don't need to track unvisited parameters.
>
> I think we should have a generic error message that includes a print out of the model. Being too detailed on the error message requires some careful finessing to make it understandable. Later we could refine to highlight the location in the model that is problematic.
In general, a block param can be an operand, therefore not used to initialize a var op.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/424#discussion_r2125168279
More information about the babylon-dev
mailing list