RFR: 8271623: Omit enclosing instance fields from inner classes that don't use it [v4]
Liam Miller-Cushon
cushon at openjdk.java.net
Mon Nov 22 21:54:10 UTC 2021
On Mon, 22 Nov 2021 21:14:39 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>>
>> - Don't remove enclosing instance fields from serializable classes without serialVersionUIDs
>> - Enable enclosing instance optimization for --release 18 and newer
>> - Add a test case with nested inner classes
>> - 8271623: Omit enclosing instance fields from inner classes that don't use it
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java line 210:
>
>> 208: * instance state.
>> 209: */
>> 210: public boolean omitUnusedPrivateSyntheticEnclosingInstanceFields() {
>
> nit: what about a shorter name for this one?
SGTM, maybe `optimizeOuterThis`? I'm open to suggestions :)
-------------
PR: https://git.openjdk.java.net/jdk/pull/4966
More information about the compiler-dev
mailing list