Intrinsic helper functions for type and representation casts.
Marker methods that are never evaluated at runtime. The plugin compiles calls as ExternalVar references; the lowering intercepts them by name and handles representation changes.
The R singleton type parameter specifies the target LoweredValueRepresentation. The plugin intercepts calls and encodes the representation name in a SIR annotation; the lowering reads it and sets the representation directly.
Example: typeProxyRepr[BuiltinList[Data], SumDataList.type](self) — view self as BuiltinList[Data] with SumDataList representation.
Type cast that marks the return value as having Data (packed) representation.
Type cast that marks the return value as having Data (packed) representation.
Use for builtin return values that produce Data — e.g., headList returns a Data element from a BuiltinList[Data]. The lowering sets representation to PackedData, causing appropriate unpacking conversions (e.g., unIData, unBData) to be generated.