Integrated: 8342967: Lambda deduplication fails with non-metafactory BSMs and mismatched local variables names
Aggelos Biboudis
abimpoudis at openjdk.org
Mon Nov 4 12:29:34 UTC 2024
On Thu, 24 Oct 2024 15:19:16 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
> After experimentation and under certain conditions, a few equivalent lambdas (up to variable renaming) fail to deduplicate.
>
> `TreeHasher` and `TreeDiffer` are now aware that other bootstraps may appear in lambda bodies (e.g. `SwitchBootstraps.typeSwitch`) and that variable names do not matter (when they appear in method/lambda definitions). In the first case equivalence is checked based on `bsmKey` and not the `Dynamic{Var, Method}Symbol` itself.
>
> The test was also adjusted since it was assuming BSM with certain structure only (that `.get(1)` was unprotected).
This pull request has now been integrated.
Changeset: 895a7b64
Author: Aggelos Biboudis <abimpoudis at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/895a7b64f01dec7248549b127875edcf006457cf
Stats: 245 lines in 6 files changed: 132 ins; 43 del; 70 mod
8342967: Lambda deduplication fails with non-metafactory BSMs and mismatched local variables names
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/jdk/pull/21687
More information about the compiler-dev
mailing list