[code-reflection] RFR: Expand the example suite with Inlining and Bytecode generation
Juan Fumero
duke at openjdk.org
Thu Aug 14 07:18:17 UTC 2025
This PR extends the sample suite for learning code reflection. It adds a couple of examples to learn how to apply inlining.
1. Inline values
2. Inline new code-reflected methods after code transformations.
In addition, it expands the examples to generate Java bytecode from code models.
All examples have been documented.
#### How to compile and run
export JAVA_HOME=<jdk-babylon-build>
mvn clean package
java --enable-preview -cp target/crsamples-1.0-SNAPSHOT.jar oracle.code.samples.InlineExample
java --enable-preview -cp target/crsamples-1.0-SNAPSHOT.jar oracle.code.samples.MathOptimizerWithInlining
-------------
Commit messages:
- [samples] documentation added
- [samples] Documentation added
- Javadoc for new examples
- Add missing examples
- [samples] Two new examples to show how to inline
Changes: https://git.openjdk.org/babylon/pull/525/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=525&range=00
Stats: 486 lines in 5 files changed: 475 ins; 0 del; 11 mod
Patch: https://git.openjdk.org/babylon/pull/525.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/525/head:pull/525
PR: https://git.openjdk.org/babylon/pull/525
More information about the babylon-dev
mailing list