refactor(javascript): break the semantic analysis import cycle (#8063)

* refactor(javascript): break the semantic analysis import cycle

Split shared semantic facts out of the analysis hub so projectors of
effects, evaluation, and identity no longer import one another in a cycle.

* refactor(javascript): share the import specifier reader

Read static imports in one module used by the boundary checker and both
cycle guards, so those rules cannot drift apart.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
morlutoandCursor Agent authored and GitHub committed 2026-10-30 06:07:49 +08:00
1 parent 940d71a45a
commit 249b90c5e3
33 files changed
+1043 -772

No files matched your search

@@ -19,23 +19,11 @@ import {
SemanticGetterQuery,
type GetterQueryJob,
} from "./javascriptSemanticGetterQueries.js";
import { expandSemanticGetterResult } from "./javascriptSemanticGetterResults.js";
import { expandSemanticGetterResult } from "./javascriptSemanticGetterResultWalker.js";
export interface JavaScriptSemanticObjectReference {
readonly node: t.Node;
readonly path: PropertyPath;
/** This selection crossed the object's prototype, rather than an own slot. */
readonly inherited?: true;
/** A shallow copy selects this prefix now while retaining its child identity. */
readonly capturedSelectionAt?: t.Node;
readonly ownEnumerable?: true;
readonly iterableFallbackPath?: PropertyPath;
readonly escapes?: true;
/** A retry omitted suffixes, so escaping constructed children must cover them. */
readonly widenedGetterResult?: true;
/** The allocation owned by this binding, rather than a read of its prior value. */
readonly ownerInitializer?: t.Node;
}
import type { JavaScriptSemanticObjectReference } from "./javascriptSemanticObjectReference.js";
export type { JavaScriptSemanticObjectReference } from "./javascriptSemanticObjectReference.js";
export const semanticClassCandidates = (
root: t.Node,