From 87b85d5b28011d4a6c95efe003e9dbd24425cf0a Mon Sep 17 00:00:00 2001 From: Malte Ubl Date: Sun, 18 Oct 2026 13:34:43 -0700 Subject: [PATCH] Name the weak collection constructors whole in the dispose gate The runtime ABI test reads every @scr_* spelling in the backend sources as a symbol the backend can emit; the gate's regex spelled a truncated @scr_weak_ prefix. Test the two declarations by their full names. Co-Authored-By: Claude Opus 5.5 --- packages/compiler/src/backend/llvm/emitter.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/compiler/src/backend/llvm/emitter.ts b/packages/compiler/src/backend/llvm/emitter.ts index a68f008f32..84614b6cbe 100644 --- a/packages/compiler/src/backend/llvm/emitter.ts +++ b/packages/compiler/src/backend/llvm/emitter.ts @@ -2002,7 +2002,9 @@ export class LlEmitter { * builders, JSON schemas and weak collection constructors are requested * lazily. */ private disposeObserverGates(): string[] { - const weak = [...this.decls].some((d) => /@scr_weak_(?:map|set)_new\(/.test(d)); + const weak = [...this.decls].some( + (d) => d.includes("@scr_weak_map_new(") || d.includes("@scr_weak_set_new("), + ); return [ `${WEAK_KEYS_GATE} = internal constant i1 ${weak}`, `${RECORD_SOURCES_GATE} = internal constant i1 ${this.dyn.keepsRecordSources}`,