Reverse engineer anything with agents, from app behavior down to native binaries.
TypeScript agent-skillsai-agentsbinary-analysisclaude-codeclicodexcordisdecompilerdeveloper-toolsdshdsh-pluginghidrahopperllmmcpmodel-context-protocolreareverse-engineeringstatic-analysistouhou
perf(javascript): skip the repeated-prefix scan on first capture visits (#1789)
Martin Klein41544fb952ae
diff --git a/src/domain/javascript/javascriptSemanticMemberMutations.ts b/src/domain/javascript/javascriptSemanticMemberMutations.tsindex 52d4b25da..62df4c38c 100644--- a/src/domain/javascript/javascriptSemanticMemberMutations.ts+++ b/src/domain/javascript/javascriptSemanticMemberMutations.ts@@ -139,8 +139,15 @@ export function* collectSemanticMemberMutationsSteps(// same prefix added on every cycle, so exact paths never repeat. When// that prefix can never be pruned, escaping it once covers every longer// effect, including writes below shared children.+ // Only a capture already on this alias chain can repeat a prefix.+ const captureKey = JSON.stringify(capture);+ const revisited = current.bindings.has(captureKey);let repeatedPrefix: PropertyPath | undefined;- for (let start = 1; start <= current.path.length; start++) {+ for (+ let start = 1;+ revisited && start <= current.path.length;+ start+++ ) {const suffix = current.path.slice(start);if (!current.bindings.has(JSON.stringify([...capture, suffix])))continue;@@ -240,7 +247,7 @@ export function* collectSemanticMemberMutationsSteps(const primitiveWrite =value?.status === "literal" || value?.status === "union";recordedEffects.add(identity);- const nested = new Set([...current.bindings, lifetime]);+ const nested = new Set([...current.bindings, lifetime, captureKey]);const origins =current.originAt === undefined? binding