[code-reflection] RFR: Support storing the code that builds the code model [v18]

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Mar 26 09:53:31 UTC 2025


On Wed, 19 Mar 2025 09:26:36 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> I agree on all points. We can have a `new.array` operation and then model class creation as an `invoke` op with method name being "init" ?
>
>> I agree on all points. We can have a `new.array` operation and then model class creation as an `invoke` op with method name being "init" ?
> 
> not sure I follow -- I was talking about class construction -- arrays are a bit special (e.g. there's no array constructor descriptor, unlike for classes). But a constructor call does share a lot of similarities with a method call, and there should be reusable code between method and constructors -- as it happens inside the javac code.

This can be deferred until we have a better op to model instance creation expression.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/305#discussion_r2013749979


More information about the babylon-dev mailing list