Logo Xantham

RenderScope_Anchored Module

Nested modules

Modules Description

ArenaInterner

Render

Functions and values

Function or value Description

addOrReplace ctx key value

Full Usage: addOrReplace ctx key value

Parameters:
Modifiers: inline

anchor ctx anchors anchorPath resolvedType

Full Usage: anchor ctx anchors anchorPath resolvedType

Parameters:
ctx : GeneratorContext
anchors : Dictionary<ResolvedType, (TypePath * Render)>
anchorPath : AnchorPath
resolvedType : ResolvedType

anchorPreludeAnchorScope ctx anchors anchorPath renderScope

Full Usage: anchorPreludeAnchorScope ctx anchors anchorPath renderScope

Parameters:
ctx : GeneratorContext
anchors : Dictionary<ResolvedType, (TypePath * Render)> option
anchorPath : AnchorPath
renderScope : RenderScope

anchorPreludeExportScope ctx export renderScopeStore

Full Usage: anchorPreludeExportScope ctx export renderScopeStore

Parameters:
Returns: Dictionary<ResolvedType, (TypePath * Render)>
ctx : GeneratorContext
export : ResolvedExport
renderScopeStore : RenderScopeStore
Returns: Dictionary<ResolvedType, (TypePath * Render)>

emitCanonicalPreludeScopes ctx

Full Usage: emitCanonicalPreludeScopes ctx

Parameters:

Emit the canonical OWNER-INDEPENDENT hoisted types once: literal-union enums at `LiteralUnions.` and shared object-literals at `SharedLiterals.`. They are anchored at their own absolute path, so the owner-driven export pass never registers them. Drive them directly from the prelude cache — each anchored-root + Transient-render prelude scope is registered into AnchorRenders by its self-anchor, so `collectModules` emits it. Interface/Class scopes also have anchored roots but Concrete renders and are emitted through the export pass — they must NOT be re-driven here. Shared by the interner-driven pipeline and the test harness.

ctx : GeneratorContext

markSharedLiterals countingCtx realCtx

Full Usage: markSharedLiterals countingCtx realCtx

Parameters:

Assign canonical `SharedLiterals.` homes to genuinely-shared hoisted object-literals. `countingCtx` is a throwaway context that has already run `processExports` with `SharedLiteralVisits = ValueSome _`, so it holds, per literal ResolvedType, the set of distinct anchored def-home paths the literal was visited under. A literal with >1 distinct home is reached through multiple owner contexts (its single def lands under only the first, dangling the rest — the shared deep-nested FS0039 class). Each such literal is given a canonical absolute home in `realCtx.SharedLiteralHomes`, which `prerender` then roots it at (mirroring LiteralUnions). Naming is DETERMINISTIC and COLLISION-FREE: the human-readable stem comes from the literal's member names, but distinct ResolvedTypes that share a stem (same property names, different property types) are disambiguated by a stable suffix derived from sorting on the literal's smallest def-home path (proven run-to-run stable). Keyed by ResolvedType identity so the SAME shared literal always maps to ONE name and DISTINCT shared literals never collapse together.

countingCtx : GeneratorContext
realCtx : GeneratorContext

markSharedLiteralsFromExportList ctx exports

Full Usage: markSharedLiteralsFromExportList ctx exports

Parameters:

Run the shared-literal counting pass over an explicit export LIST (no interner) and mark the genuinely-shared literals on `ctx`. Drives a throwaway counting context whose `SharedLiteralVisits` collector records every literal def-home VISIT, then assigns canonical `SharedLiterals.` homes to literals visited under >1 distinct home. Used by the interner-driven entry point AND directly by tests that build exports via mocks.

ctx : GeneratorContext
exports : ResolvedExport list

registerAnchorFromExport ctx export

Full Usage: registerAnchorFromExport ctx export

Parameters:

Type something to start searching.