mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-08 08:44:37 +08:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0620e30501
commit
87b85d5b28
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user