[code-reflection] RFR: New Examples: Dialects and Dynamic Function Builds [v7]

Juan Fumero jfumero at openjdk.org
Fri Sep 12 08:26:29 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?
> 
> ##### Run DialectWithInvoke
> 
> 
> java --enable-preview -cp target/crsamples-1.0-SNAPSHOT.jar oracle.code.samples.DialectWithInvoke
> 
> 
> ##### Run DialectFMAOp
> 
> 
> java --enable-preview -cp target/crsamples-1.0-SNAPSHOT.jar oracle.code.samples.DialectFMAOp
> 
> 
> ##### Run DynamicFunctionBuild
> 
> 
> java --enable-preview -cp target/crsamples-1.0-SNAPSHOT.jar oracle.code.samples.DynamicFunctionBuild

Juan Fumero has updated the pull request incrementally with one additional commit since the last revision:

  [samples] Dialect solved NPE

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

Changes:
  - all: https://git.openjdk.org/babylon/pull/549/files
  - new: https://git.openjdk.org/babylon/pull/549/files/28296c2f..0c18e7d4

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=babylon&pr=549&range=06
 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=549&range=05-06

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 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