[code-reflection] RFR: New Examples: Dialects and Dynamic Function Builds
Juan Fumero
jfumero at openjdk.org
Fri Sep 5 13:19:46 UTC 2025
- `DialectSample`: Example of how to extends the code reflection `Op` to create a new dialect.
- `DynamicFunctionBuild`: Example of how to create a new function dynamically to compute the inverse of a square root. The code model is built dynamically for a new method and it is evaluated in the `Interpreter`.
How to run?
mvn clean package
java --enable-preview -cp target/crsamples-1.0-SNAPSHOT.jar oracle.code.samples.DialectSample
java --enable-preview -cp target/crsamples-1.0-SNAPSHOT.jar oracle.code.samples.DynamicFunctionBuild
-------------
Commit messages:
- minor comment
- trip extra spaces
- New example: building new functions dynamically with code reflection
- [example] Fix printing for dialects
- Code Reflection sample for creating new Ops for a dialect
Changes: https://git.openjdk.org/babylon/pull/549/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=549&range=00
Stats: 432 lines in 3 files changed: 432 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/babylon/pull/549.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/549/head:pull/549
PR: https://git.openjdk.org/babylon/pull/549
More information about the babylon-dev
mailing list