RFR: 8325805: Compiler Implementation for Flexible Constructor Bodies (Second Preview) [v7]

Archie Cobbs acobbs at openjdk.org
Wed May 8 18:51:09 UTC 2024


> This patch changes the compiler to allow constructors to make assignments to fields prior to the `super()` invocation, i.e., in the pre-construction context.  This is part of the work associated with [JDK-8325803 - Flexible Constructor Bodies (Second Preview)](https://bugs.openjdk.org/browse/JDK-8325803).
> 
> This patch is based the relevant bits from @vicente-romero-oracle's commit [1b99b5cf](https://github.com/openjdk/valhalla/commit/1b99b5cfd9a5d484b9e7bdfc284daad9ad6535bf) to the valhalla repo.

Archie Cobbs has updated the pull request incrementally with two additional commits since the last revision:

 - Remove redundant type check.
 - Use instanceof instead of hasTag().

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18088/files
  - new: https://git.openjdk.org/jdk/pull/18088/files/b80e7527..619ab2b2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18088&range=06
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18088&range=05-06

  Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/18088.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18088/head:pull/18088

PR: https://git.openjdk.org/jdk/pull/18088


More information about the compiler-dev mailing list