[code-reflection] RFR: Add isQuotable attribute to LambdaOp [v4]

Mourad Abbay mabbay at openjdk.org
Fri Sep 5 02:51:41 UTC 2025


> In the `interpreter` and `ByteCodeGenerator` we detect if a lambda is quotable based on its functional interface. This approach will not work if intersection type is used e.g. `Runnable r = (Runnable & Quotable) () -> {};` This PR adds a flag to LambdaOp that will be set by the `javac` for quotable lambdas.

Mourad Abbay has updated the pull request incrementally with two additional commits since the last revision:

 - Correct the way we detect if a lambda is quotable when lifting bytecode
 - Update expected models in tests to include the attribute

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

Changes:
  - all: https://git.openjdk.org/babylon/pull/545/files
  - new: https://git.openjdk.org/babylon/pull/545/files/3a4da8a4..3259b02a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=babylon&pr=545&range=03
 - incr: https://webrevs.openjdk.org/?repo=babylon&pr=545&range=02-03

  Stats: 38 lines in 4 files changed: 1 ins; 0 del; 37 mod
  Patch: https://git.openjdk.org/babylon/pull/545.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/545/head:pull/545

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


More information about the babylon-dev mailing list