[code-reflection] Integrated: Lazily invoke lambda op building method

Mourad Abbay mabbay at openjdk.org
Tue Dec 23 12:38:32 UTC 2025


On Fri, 19 Dec 2025 16:02:42 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

> Validation introduced in #738 is causing reflectable lambda creation to fail with an `InternalError`. The reason for this is that we are invoking lambda op building method in the lambda class static initializer, when lambda op building method throws UOE, it causes lambda creation to fail with `InternalError`. What we want is `Op.ofQuotable` to fail but not lambda instantiation. To adress this, we now lazily invoke lambda op building method and as result we lazily compute the `Quoted` instance, while sharing the lambda model across instances of the same lambda class.

This pull request has now been integrated.

Changeset: ab78f0bd
Author:    Mourad Abbay <mabbay at openjdk.org>
URL:       https://git.openjdk.org/babylon/commit/ab78f0bd857bbf121dba04a6c13f232a17af97bc
Stats:     419 lines in 7 files changed: 233 ins; 176 del; 10 mod

Lazily invoke lambda op building method

Reviewed-by: psandoz

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

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


More information about the babylon-dev mailing list