[code-reflection] RFR: Lazily invoke lambda op building method [v2]
Mourad Abbay
mabbay at openjdk.org
Fri Dec 19 22:18:50 UTC 2025
> 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.
Mourad Abbay has updated the pull request incrementally with three additional commits since the last revision:
- Use local variables to reduce number of time we load fields
- Use CodeBuilder.IfThen
- document the equivalent java code for helpers methods
-------------
Changes:
- all: https://git.openjdk.org/babylon/pull/769/files
- new: https://git.openjdk.org/babylon/pull/769/files/f4524cbd..c092b388
Webrevs:
- full: https://webrevs.openjdk.org/?repo=babylon&pr=769&range=01
- incr: https://webrevs.openjdk.org/?repo=babylon&pr=769&range=00-01
Stats: 73 lines in 1 file changed: 25 ins; 6 del; 42 mod
Patch: https://git.openjdk.org/babylon/pull/769.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/769/head:pull/769
PR: https://git.openjdk.org/babylon/pull/769
More information about the babylon-dev
mailing list