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

Vicente Romero vromero at openjdk.org
Fri Mar 22 20:25:22 UTC 2024


On Fri, 1 Mar 2024 17:51:11 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

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

I already need this code in valhalla, I guess I will be despicably plagiarizing your code :)

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

PR Comment: https://git.openjdk.org/jdk/pull/18088#issuecomment-2015849459


More information about the compiler-dev mailing list