[lworld] RFR: 8354694: [lworld] Refactor AssertUnsetFields to Early Larval Frame
Matias Saavedra Silva
matsaave at openjdk.org
Mon Apr 28 16:50:02 UTC 2025
On Thu, 17 Apr 2025 05:43:33 GMT, Chen Liang <liach at openjdk.org> wrote:
>> This patch adds refactors so the runtime aligns with the new strict field initialization spec (https://cr.openjdk.org/~dlsmith/jep401/jep401-20250409/specs/strict-fields-jvms.html). The stackmap table entry `AssertUnsetFields` is now referred to as `Early_Larval` and it follows a new format where it is a frame that encompasses a base frame.
>
> src/hotspot/share/classfile/stackMapTable.cpp line 298:
>
>> 296: _parsed_frame_count++;
>> 297: }
>> 298:
>
> If we have no early_larval wrapping, and there is no more `uninitializedThis` in locals, we implicitly set unset fields to empty. See last sentence in section 4.7.4.
>
> So for control flow like:
>
>
> if (check) {} else {}
> this.strictField = xxx;
> super();
> if (check1) {} else {}
>
> The frame at first then-else merge has `strictField` unset, but the frame at 2nd else branch off must not be wrapped in early_larval, and verifier must accordingly clear the unset fields.
I'm not following. Placing a non-empty Early_Larval frame with without `uninitializedThis` results ina verify error.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1435#discussion_r2064083617
More information about the valhalla-dev
mailing list