mirror of
https://github.com/morluto/rea
synced 2026-10-27 22:45:19 -04:00
fix(javascript): separate erased types from runtime semantics
Record erasure during definition indexing and reuse it across runtime references, captures, effects, module links, routes, Electron and Vite. Preserve source type links and emitted decorator and computed-key effects; keep actual runtime reads and escapes conservative.
Validation: 1,647 focused tests and 9 documentation tests passed, with build, static and documentation gates. The inherited reference-lifetimes stress file exhausts a 512 MiB worker on both unmodified 18451e479 and this change; that file remains unverified. TypeScript 7.0.2 emit was inspected for ES2022 and ES2018 without executing emitted code.
This commit is contained in:
@@ -113,7 +113,10 @@ export function* analyzeParsedJavaScriptStaticSourceSteps(
|
||||
isElectronRendererLoad(callee, site, findings, index),
|
||||
source,
|
||||
accumulator,
|
||||
vitePreloadDependencyTable: indexVitePreloadDependencyTable(file.program),
|
||||
vitePreloadDependencyTable: indexVitePreloadDependencyTable(
|
||||
file.program,
|
||||
bindings.erasedSyntaxNodes,
|
||||
),
|
||||
openReceiverFacts: receivers.openReceivers,
|
||||
electronBindings: electronIdentity.bindings,
|
||||
electronExportIntact: electronIdentity.intactExport,
|
||||
@@ -167,7 +170,8 @@ function* traverseStaticSourceSteps(
|
||||
enter: (node, parent) => {
|
||||
findings.accumulator.visitedNodes += 1;
|
||||
routeScan.inspect(node, parent);
|
||||
inspectNode(node, findings, bindings);
|
||||
if (!bindings.erasedSyntaxNodes.has(node))
|
||||
inspectNode(node, findings, bindings);
|
||||
return undefined;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user