[code-reflection] RFR: Onnx direct reflection over records as tuples [v2]
    Adam Sotona 
    asotona at openjdk.org
       
    Mon Mar 31 13:47:41 UTC 2025
    
    
  
> This PR removes `ExplicitOnnxOps.LoopReturn` and reflects directly on Records.
> 
> Unfortunately in some situations `new LoopReturn` cause javac crashing with IOOBE  at `jdk.incubator.code/jdk.incubator.code.internal.ReflectMethods$BodyScanner.thisValue(ReflectMethods.java:689)`.
> 
> Problematic use cases are at `WalkTheMazeTest::turnRight` and `WalkTheMazeTest::turnLeftWhileWall`.
> While seamlessly working use cases are at `WalkTheMazeTest::walkAroundTheMaze` and `SimpleTest::forLoopAdd`.
> 
> As a temporary workaround any static factory method returning a record is also treated as a tuple constructor.
> 
> Please review.
> 
> Thanks,
> Adam
Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
  support for list and record return types
-------------
Changes:
  - all: https://git.openjdk.org/babylon/pull/375/files
  - new: https://git.openjdk.org/babylon/pull/375/files/79195817..be1f5d6e
Webrevs:
 - full: https://webrevs.openjdk.org/?repo=babylon&pr=375&range=01
 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=375&range=00-01
  Stats: 67 lines in 3 files changed: 59 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/babylon/pull/375.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/375/head:pull/375
PR: https://git.openjdk.org/babylon/pull/375
    
    
More information about the babylon-dev
mailing list