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 15 20:18:06 UTC 2021


> 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 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

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

Changes: https://git.openjdk.java.net/jdk/pull/4966/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4966&range=03
  Stats: 464 lines in 16 files changed: 425 ins; 12 del; 27 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4966.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4966/head:pull/4966

PR: https://git.openjdk.java.net/jdk/pull/4966


More information about the compiler-dev mailing list