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
+2 -5
View File
@@ -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;