deduplicating lambda methods
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Tue Mar 27 15:07:22 UTC 2018
Hi Liam,
I believe --debug options are used to generate extra information out of
javac, not to alter its behavior - it's probably better to use an hidden
flag (e.g. -XDdeduplicateLambdas=...) - which is consistent to what we
have done for indy string concat.
Maurizio
On 27/03/18 11:53, Liam Miller-Cushon wrote:
> On Tue, Mar 27, 2018 at 3:17 AM Maurizio Cimadamore
> <maurizio.cimadamore at oracle.com
> <mailto: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/
> <http://cr.openjdk.java.net/%7Ecushon/lambdadedup/webrev.05/>
More information about the amber-dev
mailing list