ScalusRuntime

scalus.compiler.sir.lowering.ScalusRuntime
object ScalusRuntime

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Convert a builtin list (SumBuiltinList repr) to a UplcConstr chain: Cons(h,t) = Constr(0, [h, t]), Nil = Constr(1, []).

Convert a builtin list (SumBuiltinList repr) to a UplcConstr chain: Cons(h,t) = Constr(0, [h, t]), Nil = Constr(1, []).

Value parameters

input

the builtin list value

listType

the SIR type of the list (e.g., List[Point])

outSum

the target SumUplcConstr representation

pos

source position

Attributes

def initContext(lctx: LoweringContext): Unit

Add to context scope lazy val with runtime functions.

Add to context scope lazy val with runtime functions.

Attributes

Eagerly materialize every support-module binding into lctx.scope as a lazy named var.

Eagerly materialize every support-module binding into lctx.scope as a lazy named var.

Called from initContext so repeated SIR.ExternalVar references to a support-module binding all resolve (via lctx.scope.getByName) to the SAME VariableLoweredValue, avoiding duplicate definitions and leaking pattern-bound vars across support-binding bodies.

For bindings in the UplcConstrListOperations / UplcConstrOptionOperations modules we lower under inUplcConstrListScope = true so inner List.Cons(...) / Option.Some(...) / List.Nil / Option.None emissions pick SumCaseUplcConstrEmitter.

Attributes

Convert a UplcConstr list (Constr chain) to a builtin list (SumBuiltinList).

Convert a UplcConstr list (Constr chain) to a builtin list (SumBuiltinList).

Iterates the Constr chain using Case-based matching, converts each element to the target element repr, and builds a builtin list with mkCons. Reverse of builtinListToUplcConstr.

Attributes

Concrete fields

val ARRAY_TO_LIST_NAME: String
val MAP_LIST_NAME: String