[code-reflection] RFR: Replace the use of Interpreter to create Quoted instance with specialized code [v4]

Mourad Abbay mabbay at openjdk.org
Wed May 28 10:23:01 UTC 2025


On Thu, 22 May 2025 10:49:33 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Implement quotedOp method
>
> src/jdk.incubator.code/share/classes/jdk/incubator/code/op/CoreOp.java line 4494:
> 
>> 4492: 
>> 4493:     public static Quoted quotedOp(FuncOp funcOp, Object[] args) {
>> 4494: 
> 
> I believe the checks you enforce are correct -- but leaving these checks as plain `assert` feel odd -- e.g. this is the contract of an API method, so the contract of such method should be fully specified, and real exceptions must be thrown. With `assert`, the issues will only be reported if the user enables assertion when running their code (actually worse, since these assertions are inside JDK, they would need to enable "system assertions" -- which is to say that they will never see this code fail in the way you intended).

I will update to throw in case a check fails.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/424#discussion_r2111493009


More information about the babylon-dev mailing list