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:
@@ -3,10 +3,7 @@ import * as t from "@babel/types";
|
||||
import { compareCodePoints } from "./canonicalOrdering.js";
|
||||
import type { ElectronStaticValue } from "./electronStaticAnalysisTypes.js";
|
||||
import { semanticStaticPropertyName } from "./javascriptAstValues.js";
|
||||
import {
|
||||
propertyName,
|
||||
sourceSlice,
|
||||
} from "./javascriptStaticAnalysisHelpers.js";
|
||||
import { sourceSlice } from "./javascriptStaticAnalysisHelpers.js";
|
||||
|
||||
/** Preserve one literal value or the exact inert expression. */
|
||||
export const electronStaticValue = (
|
||||
@@ -128,7 +125,7 @@ const collectMembersAt = (
|
||||
state.unknown += 1;
|
||||
continue;
|
||||
}
|
||||
const name = propertyName(property.key);
|
||||
const name = semanticStaticPropertyName(property.key, property.computed);
|
||||
if (name === "" || property.computed) {
|
||||
state.unknown += 1;
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user