[code-reflection] Integrated: Rearrange ops/types into dialects

Paul Sandoz psandoz at openjdk.org
Fri Jun 13 22:10:46 UTC 2025


On Thu, 12 Jun 2025 22:37:17 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

> Group the operations and types into dialects.
> 
> We currently have three distinct areas:
> 
> 1) The core, comprising type elements such as Var, Tuple and operations such as constant, branch, closure, var, and var.load/store. Some of these have correspondence to Java expressions or statements, and some are used to model Java program behavior, but they are also general purpose.
> 
> 2) The core, comprising the java type elements, and operations such as return, invoke, and instanceof that more specifically model some Java expression or statement, or more specific Java program behavior. Some Java operations can be repurposed e.g. arithmetic operations.
> 
> 3) The extended, comprising operations such as for and if, using types from 1 and 2, that can lower into operations from 1 and 2. These model Java expressions, statements or more specific Java program behavior that have nested structure, often with control flow.
> 
> At the moment we lump 1 and 2 together under `CoreOp`, and separate 3 under `ExtendedOp`. This PR separates out 1 and 2, and lumps together 2 and 3:
> 
> - separating 1 into a dialect named "core" under `CoreOp`; and
> 
> - lumping 2 and 3 into a dialect named “java” under `JavaOp`.
> 
> The following packages are created to place relevant types/ops:
> 
>     java.lang.reflect.code.dialect.core
>     java.lang.reflect.code.dialect.java
> 
> The packages `java.lang.reflect.code.op` and `java.lang.reflect.code.type` are removed.
> 
> This PR will retain the type element factory and op factory design. We can revisit that in another PR.

This pull request has now been integrated.

Changeset: b5064081
Author:    Paul Sandoz <psandoz at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/b5064081cf5822cf00dfa766a25d51de2a9a233a
Stats:     17859 lines in 263 files changed: 8304 ins; 8209 del; 1346 mod

Rearrange ops/types into dialects

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

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


More information about the babylon-dev mailing list