From daniel.smith at oracle.com Wed Mar 5 02:01:54 2025 From: daniel.smith at oracle.com (Dan Smith) Date: Wed, 5 Mar 2025 02:01:54 +0000 Subject: New JEP: Strict Field Initialization in the JVM Message-ID: <1F157E45-8AE9-49A3-8E4D-4B7A3213EC5A@oracle.com> As we've worked through the details of strictly-initialized fields, it has made sense to spin the feature off into its own JVM-only preview feature JEP: https://openjdk.org/jeps/8350458 The Value Classes and Objects JEP will depend on Strict Field Initialization in the JVM. The JEP covers all uses of ACC_STRICT: final and non-final, static and non-static. We've worked to unify these under a cohesive model, where all strict field initialization happens within a *larval initialization state*. Static field initialization rules are enforced dynamically, while instance field initialization rules are enforced by verification. A few months ago, the EG discussed the idea that, if we require all fields to be set in a basic block immediately before the 'super()' call, the verifier could enforce the initialization requirements without any changes to StackMapTable. We seriously considered that idea, but concluded that it was worthwhile to enhance StackMapTable to be able to express intermediate initialization states. So this JEP includes the 'assert_unset_fields' entry we discussed previously. This is a draft, feedback is welcome! From daniel.smith at oracle.com Wed Mar 5 02:04:54 2025 From: daniel.smith at oracle.com (Dan Smith) Date: Wed, 5 Mar 2025 02:04:54 +0000 Subject: EG meeting, 2025-03-05 Message-ID: We'll hold the EG meeting tomorrow in the usual time slot: March 5, 17:00 UTC (9am PST, 12pm EST, 6pm CET). We can discuss the Strict Field Initialization JEP.