fix(javascript): preserve uncertain call targets across activation boundaries

This commit is contained in:
morluto committed 2026-10-20 17:18:18 +08:00
1 parent 599fdac029
commit 3b02179560
7 files changed
+180 -13

No files matched your search

@@ -7,6 +7,7 @@ import {
import * as t from "@babel/types";
import {
semanticComputedMethodKey,
semanticBranchMayBeSkipped,
semanticIterationCardinality,
} from "./javascriptSemanticEvaluationOrder.js";
@@ -1029,10 +1030,7 @@ function* collectDefinitionsSteps(
needsPrototypeFacts = true;
let parentScope = currentSemanticScope(stack);
if (
parent !== null &&
(t.isObjectMethod(parent) || t.isClassMethod(parent)) &&
parent.computed &&
parent.key === node &&
semanticComputedMethodKey(parent ?? undefined, node) &&
parentScope.parentScopeId !== null
) {
// A computed method key is evaluated before entering the method's