mirror of
https://github.com/morluto/rea.git
synced 2026-10-29 02:45:58 +00:00
perf(javascript): reduce retained semantic analysis allocations (#1601)
Reduce retained semantic allocations and memoize lexical scope ancestry while preserving semantic identities. Refs #1065 and #1563; the complete-directory memory failure remains open.
This commit is contained in:
1 parent
f4e437e544
commit
b28c0337fc
7 files changed
+125
-44
No files matched your search
@@ -83,7 +83,14 @@ const semanticReturnSiteId = (
|
||||
callableId: string,
|
||||
location: JavaScriptSemanticReturnSite["location"],
|
||||
): string =>
|
||||
`${callableId}:return:${String(location.start.line)}:${String(location.start.column)}:${String(location.end.line)}:${String(location.end.column)}`;
|
||||
[
|
||||
callableId,
|
||||
"return",
|
||||
String(location.start.line),
|
||||
String(location.start.column),
|
||||
String(location.end.line),
|
||||
String(location.end.column),
|
||||
].join(":");
|
||||
|
||||
/** Link exports to callables only when lexical resolution is unique and exact. */
|
||||
export const resolveSemanticModuleCallables = (
|
||||
|
||||
Reference in new issue
Block a user