refactor(domain): consolidate property-key extraction behind semanticStaticPropertyKey (#823)

Inline the private memberKey/propertyKey wrappers in semantic
MemberMutations/Projection/Values to direct canonical calls.
Migrate the electron Browser/Values member keys off legacy
propertyName (provably identical: explicit computed guard retained).
Delegate bundle calleeName/endpointArgument/stringArgument to the
static helpers, adding loadURL endpoint parity with static analysis.

Bundle regressions pin nested-dynamic-receiver and loadURL parity.
Remaining computed-identifier forks in electron Native/Ipc tracked
in #822.
This commit is contained in:
morluto
2026-10-07 11:13:59 +08:00
committed by GitHub
parent 75f50d86f6
commit 764ff05231
8 changed files with 54 additions and 84 deletions
+5 -3
View File
@@ -8,13 +8,15 @@ import { semanticStaticPropertyName } from "./javascriptAstValues.js";
import {
calleeName,
endpointArgument,
stringValue,
} from "./javascriptStaticAnalysisHelpers.js";
import {
location,
locationFields,
objectString,
objectValue,
resolveSpecifier,
isUrlLikeModuleSpecifier,
stringArgument,
} from "./webBundleAnalyzerAst.js";
type BundleObservations = WebBundleAnalysis["observations"];
@@ -109,7 +111,7 @@ const inspectCall = (
accumulator: AnalysisAccumulator,
): void => {
const name = calleeName(node.callee);
const first = stringArgument(node.arguments[0]);
const first = stringValue(node.arguments[0]);
if ((name === "require" || name.endsWith(".require")) && first !== undefined)
addEdge({
script,
@@ -120,7 +122,7 @@ const inspectCall = (
});
if (name === "importScripts" || name.endsWith(".importScripts"))
for (const argument of node.arguments) {
const specifier = stringArgument(argument);
const specifier = stringValue(argument);
if (specifier === undefined) continue;
addEdge({ script, specifier, kind: "worker_import", node, accumulator });
}