Logo Xantham

ArenaInterner Module

Functions and values

Function or value Description

markDeclaredTypePaths ctx interner

Full Usage: markDeclaredTypePaths ctx interner

Parameters:

Record the flattened path of EVERY namespace (emitted as an F# module). A TS name declared as both an interface and a namespace collides: the module wins the slot and the interface def is dropped, so a type-REF to the interface dangles. Consulted in `prerender`'s Interface arm to erase such refs to `obj` (a namespace used as a value type is untypeable; ledgered). Uses `Path.fromModule`'s flattened form, which `fromInterface` mirrors, so the interface ref's path matches this module's path. Record every REAL declared type's flattened path (interface/class/alias/enum, walked through modules) BEFORE processExports — the dangling-self-namespace scrub's KEEP-list (see scrubDanglingSelfRefs).

ctx : GeneratorContext
interner : ArenaInterner

markModuleTypePaths ctx interner

Full Usage: markModuleTypePaths ctx interner

Parameters:

markSharedLiteralsFromExports ctx interner

Full Usage: markSharedLiteralsFromExports ctx interner

Parameters:

Phase 1: drive the full anchoring once on a throwaway context whose `SharedLiteralVisits` collector records every literal def-home VISIT, then mark the genuinely-shared literals on the real context. Must run BEFORE the real `processExports`/prerender so `prerender` roots shared literals at their canonical home on the real pass. The throwaway context is fully independent (its own prelude/anchor caches) so the count never pollutes the real output.

ctx : GeneratorContext
interner : ArenaInterner

processExports ctx interner

Full Usage: processExports ctx interner

Parameters:

Type something to start searching.