Journal the shared-module plan fields in the lowerer

The unit-journal test merged in from main requires every lowerer field
to be journaled or named as unjournaled, and the NI-6 fields were
neither: `sharedModulePlans` runs inside the first unit that lowers a
module, so journal the warning count like `diags`, and name the plan
memo and the per-statement TDZ flags it fills as unjournaled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Malte Ubl
2026-10-28 05:38:33 -07:00
co-authored by Claude Opus 5.5
parent 96601855ba
commit 4a673558b9
@@ -4096,6 +4096,10 @@ export class Lowerer {
setTable("freezableArrays", this.freezableArrays),
checkedTable("moduleOrder", () => this.moduleOrder.length),
checkedTable("diags", () => this.diags.length),
// The shared-module plan runs inside the first unit that lowers a
// module; a warning it adds is a diagnostic of that unit, so its count
// is journaled like `diags` (the plan itself is unjournaled).
checkedTable("sharedModuleWarnings", () => this.sharedModuleWarnings.length),
// Node island call sites hold literals of the unit's IR that lowering's
// end rewrites to module tree paths (nodeIslandRecord): a unit that adds
// one lowers again rather than replaying a record.
@@ -4370,6 +4374,11 @@ export class Lowerer {
"argumentCountSlots",
"coercions.widenedReturnTypes",
"packageFileMemo",
// The modules shared with the islands (NI-6): a pure function of the
// program's modules, computed once, and the TDZ flags its plan gives a
// statement.
"sharedModules",
"sharedInitFlags",
"slotOriginMemo",
"recordOriginMemo",
"boundaryCastOrder",