deduplicating lambda methods

Remi Forax forax at
Sun Mar 4 13:11:28 UTC 2018

Hi Vincente,

----- Mail original -----
> De: "Vicente Romero" <vicente.romero at>
> À: "Liam Miller-Cushon" <cushon at>, "amber-dev" <amber-dev at>, "Brian Goetz"
> <brian.goetz at>
> Envoyé: Samedi 3 Mars 2018 05:01:47
> Objet: Re: deduplicating lambda methods


>> 2) Debug info: the optimization is safe if line numbers are not being
>> emitted. If they are, is there a way to deduplicate the methods
>> without breaking debug info?
> I haven't tried to debug a method with more than one LNT, the spec
> allows it but not sure how IDEs will operate on that

from JVMS 4.7.13, 
"The LocalVariableTable attribute is an optional variable-length attribute in the attributes table of a Code attribute (§4.7.3). It may be used by debuggers to determine the value of a given local variable during the execution of a method.
If multiple LocalVariableTable attributes are present in the attributes table of a Code attribute, then they may appear in any order.
There may be no more than one LocalVariableTable attribute per local variable in the attributes table of a Code attribute. "

You can not have several LNTs that map different parts of a compilation unit to the same bytecode because if you have several attributes it's like you can merge them into one attribute,
so deduplication if there are debug info is not possible as far as i know.

> Vicente


More information about the amber-dev mailing list