From 4a673558b946326899c9368bd67726983be2e9cf Mon Sep 17 00:00:00 2001 From: Malte Ubl Date: Wed, 28 Oct 2026 05:38:33 -0700 Subject: [PATCH] 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 --- packages/compiler/src/frontend/lowering/lowerer.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/compiler/src/frontend/lowering/lowerer.ts b/packages/compiler/src/frontend/lowering/lowerer.ts index c81e34e7dc..3cef81c5cc 100644 --- a/packages/compiler/src/frontend/lowering/lowerer.ts +++ b/packages/compiler/src/frontend/lowering/lowerer.ts @@ -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",