mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 21:46:01 +00:00
refactor(domain): reuse ordered map appends in index builders (#14548)
This commit is contained in:
1 parent
15e5b421bf
commit
5cd8658643
49 files changed
+115
-195
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { appendToMapList } from "../../domain/appendToMapList.js";
|
||||
import type { AnalysisParameterLimit } from "../../domain/analysisSettings.js";
|
||||
import {
|
||||
createJavaScriptSemanticGraph,
|
||||
@@ -1072,10 +1073,7 @@ const projectCalls = (context: FileContext): void => {
|
||||
JavaScriptSemanticCallReturnFlow[]
|
||||
>();
|
||||
for (const flow of context.ir.callReturnFlows) {
|
||||
const grouped = returnFlowsByCallSite.get(flow.callSiteId);
|
||||
if (grouped === undefined)
|
||||
returnFlowsByCallSite.set(flow.callSiteId, [flow]);
|
||||
else grouped.push(flow);
|
||||
appendToMapList(returnFlowsByCallSite, flow.callSiteId, flow);
|
||||
addRelation(context.state, {
|
||||
source: context.returnSiteNodes.get(flow.returnSiteId),
|
||||
target: context.callSiteNodes.get(flow.callSiteId),
|
||||
|
||||
Reference in new issue
Block a user