RFR: 8342806: Desugar capturing lambda in StringNameTable [v2]

Claes Redestad redestad at openjdk.org
Tue Oct 22 11:30:41 UTC 2024


On Tue, 22 Oct 2024 11:24:38 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   de-this
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/util/StringNameTable.java line 68:
> 
>> 66:         if (name == null) {
>> 67:             name = new NameImpl(this, intern ? string.intern() : string);
>> 68:             nameMap.put(string, name);
> 
> Since we are interning, can we use the possibly-interned result as map key when we put the name? This will be another bug fixed by desugaring.

Nice catch! I don't think we use the interning today since performance was subpar, and this might be a contributing factor. Re-running the micros.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21631#discussion_r1810544892


More information about the compiler-dev mailing list