[code-reflection] RFR: Fix lambda bugs [v5]
Paul Sandoz
psandoz at openjdk.org
Tue Sep 2 15:39:04 UTC 2025
On Mon, 1 Sep 2025 15:49:08 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:
>> I'm not sure about this... I get that the inner lambda has its own synthetic method with its own code model. But, if I take the outer lambda an execute it, e.g. using the Interpreter or BytecodeGenerator, won't I then have an issue -- as we would have lost the information that the nested lambda was quotable and, as such, required different treatment?
>
> The interpreter will make sure calling Op.ofQuotable for the inner lambda would return Quoted instance that has the model of the lambda.
I think we need to strengthen the signal that the lambda op's behavior is to produce an instance of a functional interface that may also be quotable. Requiring that we resolve the functional interface reference is too fragile.
The lambda op could have an optional attribute that indicates it has quotable behaviour, independent of whether the functional interface extends `Quotable` (or we cast an intersection of `Quotable`).
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/532#discussion_r2316463706
More information about the babylon-dev
mailing list