[code-reflection] RFR: Replace the use of Interpreter to create Quoted instance with specialized code [v22]
Paul Sandoz
psandoz at openjdk.org
Wed Jun 18 23:26:40 UTC 2025
On Wed, 18 Jun 2025 18:32:23 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:
>> Creating Quoted instance was done by invoking the Interpreter. The Interpreter is too general and if someone could somehow inject any code model we will interpret that as well. This PR replace the use of the interpreter with specialized code.
>
> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove TODOs
src/jdk.incubator.code/share/classes/jdk/incubator/code/op/CoreOp.java line 4561:
> 4559: switch (v) {
> 4560: case Block.Parameter p -> {
> 4561: Object rv = args[params.indexOf(p)];
Suggestion:
Object rv = args[p.index()];
src/jdk.incubator.code/share/classes/jdk/incubator/code/op/CoreOp.java line 4568:
> 4566: m.put(v, Var.of(cop.value()));
> 4567: } else if (varOp.initOperand() instanceof Block.Parameter p) {
> 4568: Object rv = args[params.indexOf(p)];
Suggestion:
Object rv = args[p.index()];
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/424#discussion_r2155708421
PR Review Comment: https://git.openjdk.org/babylon/pull/424#discussion_r2155708911
More information about the babylon-dev
mailing list