[code-reflection] RFR: Lambda model uniqueness

Mourad Abbay mabbay at openjdk.org
Sat May 3 08:49:14 UTC 2025


Lambdas that share the same proxy class, have the same implementation and therefore have the same code model generated by the compiler. In this PR, we share the code model across instances of the same proxy class. 
This also means we reduce execution time as we only need to invoke `opMethod` once for given proxy class.
With these changes we can compare lambda code model based on identity.

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

Commit messages:
 - Rename a test
 - Share the compiler generated code model of a lambda across instances of its proxy class

Changes: https://git.openjdk.org/babylon/pull/420/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=420&range=00
  Stats: 112 lines in 3 files changed: 93 ins; 12 del; 7 mod
  Patch: https://git.openjdk.org/babylon/pull/420.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/420/head:pull/420

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


More information about the babylon-dev mailing list