[code-reflection] Integrated: Expand the example suite with Inlining and Bytecode generation

Juan Fumero duke at openjdk.org
Thu Aug 14 11:08:38 UTC 2025


On Thu, 14 Aug 2025 07:11:14 GMT, Juan Fumero <duke at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: 19daae13
Author:    Juan Fumero <jjfumero at gmail.com>
Committer: Gary Frost <gfrost at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/19daae133c6fc99c31a02a276cc11fdf2a8a099a
Stats:     486 lines in 5 files changed: 475 ins; 0 del; 11 mod

Expand the example suite with Inlining and Bytecode generation

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

PR: https://git.openjdk.org/babylon/pull/525


More information about the babylon-dev mailing list