RFR: 8271623: Omit enclosing instance fields from inner classes that don't use it [v3]
Florian Weimer
fweimer at openjdk.java.net
Fri Nov 12 20:06:40 UTC 2021
On Mon, 11 Oct 2021 20:11:30 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
>> This change omits the synthetic `this$0` field from inner classes that do not access any enclosing instance state.
>
> 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 three commits:
>
> - 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
Is it desirable to do this change for `Serializable` inner classes? If they do not define `serialVersionUID`, it won't be possible to deserialize existing data.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4966
More information about the compiler-dev
mailing list