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
-17
View File
@@ -14,7 +14,6 @@ import {
collectSemanticReferences,
immutableSemanticBindings,
immutableSemanticScopes,
reachSemanticLimit,
semanticModuleOrigin,
semanticStaticPropertyName,
} from "./javascriptSemanticProjection.js";
@@ -249,17 +248,6 @@ const nestedScope = (
): JavaScriptSemanticScopeState | undefined => {
const kind = scopeKind(node, parent);
if (kind === undefined) return undefined;
if (state.scopes.length >= state.limits.maxScopes) {
reachSemanticLimit(state, "maxScopes");
return {
scopeId: `${semanticScopeId(kind, node)}:omitted`,
parentScopeId: parentScope.scopeId,
kind,
location: range(node),
bindingsComplete: false,
bindings: new Map(),
};
}
const scope: JavaScriptSemanticScopeState = {
scopeId: semanticScopeId(kind, node),
parentScopeId: parentScope.scopeId,
@@ -447,11 +435,6 @@ const addBinding = (input: AddBindingInput): void => {
state.omittedCount += 1;
return;
}
if (state.bindingsById.size >= state.limits.maxBindings) {
scope.bindingsComplete = false;
reachSemanticLimit(state, "maxBindings");
return;
}
binding = createBinding(scope, name, kind, mutable);
scope.bindings.set(name, binding);
state.bindingsById.set(binding.bindingId, binding);