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:
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user