SharedLiterals Module
Functions and values
| Function or value |
Description
|
Full Usage:
addHome ctx key home
Parameters:
GeneratorContext
key : ResolvedType
home : TypePath
|
|
|
Record (during the counting pre-pass) that the union-member object-literal `key` is referenced by the current top-level owner. A `key` with >1 distinct referencing owner is shared and is canonicalized into `SharedLiterals` alongside the def-VISIT-gated literals. No-op outside the counting pass (`SharedLiteralRefOwners`/`CurrentRefOwner` unset).
|
Full Usage:
tryGetHome ctx key
Parameters:
GeneratorContext
key : ResolvedType
Returns: TypePath voption
|
The canonical owner-independent home (if any) for a shared hoisted object-literal.
|