deduplicating lambda methods

Liam Miller-Cushon cushon at google.com
Tue Mar 27 10:53:59 UTC 2018


On Tue, Mar 27, 2018 at 3:17 AM Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:

> I see that the dedup logic is disabled for serializable lambdas and also
> when debugging options are present. As you said, there are some tests
> that rely on certain bytecode shape, so in such case it might be handy
> to switch off the machinery entirely; rather than switching off the
> machinery by using '-g' (which could result in potentially other
> bytecode changes), I guess I'd prefer to have an escape hatch hidden
> flag we could use to shut down the dedup machinery entirely, without
> altering any other javac codegen behavior. This could be useful as a
> conservative prevention measures in build systems (e.g. JDK itself).
>

I should have clarified that the flag I added in the last update to fix the
tests
is actually a new flag (--debug:deduplicateLambdas={true,false}), instead of
using '-g' to disable deduplication as a side-effect.

Here it is as a webrev:
http://cr.openjdk.java.net/~cushon/lambdadedup/webrev.05/


More information about the amber-dev mailing list