[code-reflection] RFR: Create Quoted instance when it's requested

Paul Sandoz psandoz at openjdk.org
Wed May 7 19:34:13 UTC 2025


On Wed, 7 May 2025 17:48:14 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

> This PR moves construction of Quoted instance from constructor to the method that returns it. This simple change will allow us to lazily invoke `opMethod`, something I will work on in a follow up PR.
> 
> This changes are based on #420.

I totally forgot we currently run the lambda code model through the interpreter to obtain the quoted instance! I don't think we should modify the meta factory as i suggested, apologies for misleading you.

At some point I think we need to remove the dependency on the interpreter - so we explicitly validate the lambda code model and the operate on it directly to create the `Quoted` instance. (For specification I think it is important we retain the current lambda code model program behavior.)

In fact i am not sure it is worth doing anything lazy right now in subsequent PRs and a better focus of effort would be to remove the dependency on the interpreter. After that we can address lazy construction of models.

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

PR Review: https://git.openjdk.org/babylon/pull/422#pullrequestreview-2822973831


More information about the babylon-dev mailing list