RFR: 8342967: Lambda deduplication fails with non-metafactory BSMs and mismatched local variables names [v4]
Aggelos Biboudis
abimpoudis at openjdk.org
Tue Oct 29 16:08:56 UTC 2024
> 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).
Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
Assume that two lambdas that contain a class definition (any) are always different
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/21687/files
- new: https://git.openjdk.org/jdk/pull/21687/files/c51e7385..afed3649
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=21687&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=21687&range=02-03
Stats: 35 lines in 4 files changed: 14 ins; 7 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/21687.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21687/head:pull/21687
PR: https://git.openjdk.org/jdk/pull/21687
More information about the compiler-dev
mailing list