refactor(analysis): remove fixed result quotas

This commit is contained in:
morluto
2026-09-29 13:57:24 +08:00
parent 0e2738ffb6
commit 20152a9872
105 changed files with 605 additions and 1084 deletions
@@ -6,7 +6,6 @@ import type {
JavaScriptSemanticChildProcessSpawn,
} from "./javascriptSemanticIr.js";
import {
reachSemanticLimit,
semanticCallableIdForNode,
semanticStaticPropertyName,
} from "./javascriptSemanticProjection.js";
@@ -83,7 +82,6 @@ const collectSpawns = (
return;
const method = childProcessMethod(node.callee, state);
if (method === null) return;
if (operationLimitReached(output.length, state)) return;
output.push({
node,
method,
@@ -151,7 +149,6 @@ const collectInteractions = (
context,
);
if (interaction === null) return;
if (operationLimitReached(spawns.length + output.length, state)) return;
output.push(interaction);
},
exit: (node) => popCallable(node, callableStack),
@@ -366,15 +363,6 @@ const literalString = (
return null;
};
const operationLimitReached = (
retained: number,
state: JavaScriptSemanticAnalysisState,
): boolean => {
if (retained < state.limits.maxChildProcessOperations) return false;
reachSemanticLimit(state, "maxChildProcessOperations");
return true;
};
const popCallable = (node: t.Node, stack: string[]): void => {
const callableId = semanticCallableIdForNode(node);
if (callableId !== null && stack.at(-1) === callableId) stack.pop();