[code-reflection] RFR: Replace methods "create" in Op subclasses by constructors [v2]

Paul Sandoz psandoz at openjdk.org
Tue Sep 30 19:56:09 UTC 2025


On Mon, 29 Sep 2025 19:20:20 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

>> By using flexible constructor bodies feature, we get rid of methods "create" in Op subclasses and we replace it with constructors. We also remove unused constructors and methods in Op subclasses.
>
> Mourad Abbay has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
> 
>  - Restore constructor and method that have usage
>  - Merge branch 'code-reflection' into rm-op-create
>    
>    # Conflicts:
>    #	src/jdk.incubator.code/share/classes/jdk/incubator/code/dialect/core/CoreOp.java
>  - Remove unused constructors and methods
>  - Replace methods that create Ops from ExternalizedOp, by constructors

Very good, a pleasing uniformity, just one minor comment, no need for another review if to address that.

src/jdk.incubator.code/share/classes/jdk/incubator/code/dialect/core/CoreOp.java line 123:

> 121:         }
> 122: 
> 123:         FuncOp(FuncOp that, String funcName, CopyContext cc, OpTransformer ot) {

Group that with the other copying constructor, then its easier to see their relationship and whether we need to keep both.

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

Marked as reviewed by psandoz (Lead).

PR Review: https://git.openjdk.org/babylon/pull/584#pullrequestreview-3286489354
PR Review Comment: https://git.openjdk.org/babylon/pull/584#discussion_r2392669135


More information about the babylon-dev mailing list