[code-reflection] RFR: Bytecode round 12 [v3]

Adam Sotona asotona at openjdk.org
Mon Sep 2 06:00:32 UTC 2024


On Fri, 30 Aug 2024 20:11:41 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   minor corrections
>
> test/jdk/java/lang/reflect/code/bytecode/TestSmallCorpus.java line 171:
> 
>> 169:     private void verify(String category, CoreOp.FuncOp func) {
>> 170:         OpWriter.CodeItemNamerOption naming = null;
>> 171:         for (Body body : func.bodies()) {
> 
> It's possible to collapse all the loops by traversing the operations, passing in `naming` as the argument e.g.,
> 
> naming = func.traverse(naming, opVisitor((n, op) -> {
>     for (Value v : op.operands()) {
>         if (!op.result().isDominatedBy(v)) {
>             if (n == null) { n = ... }
>             ...
>         }
>     }
>     return n;
> }));

Yes, I'll change it. Original idea was that more verifications will hook also on Body and Block level, however Op-level verification seem to be enough.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/219#discussion_r1740361325


More information about the babylon-dev mailing list