Explorer

core.compile-call-arguments-ranked

description
Instructions that push the arguments of a call from the rank rank on, in the order the function receives them (core.call-argument-rank, the order of the names), for array.new_fixed. The function indices of each argument are counted in the written order (core.call-argument-fn-base)
type
Fn(
  arguments: List<Record{name: String, value: @core.expression}>,
  rank: Number,
  env: List<Record{variable_id: Number, local: Number}>,
  depth: Number,
  fn_base: Number,
  ctx: Record{
    parts: List<Record{id: String, expression: @core.expression, base: Number}>,
    inlining: List<String>,
    part_index: List<List<Record{id: String, expression: @core.expression, base: Number}>>,
    strings: List<Record{value: String, address: Number}>
  }
) -> List<Number>
expression
fn(arguments$0, rank$1, env$2, depth$3, fn_base$4, ctx$5) =>
  match @core.call-argument-with-rank(arguments: $0, rank: $1, index: 0) {
    #none(_) =>
      [],
    #some(argument$6) =>
      @core.list-concat(
        left: @core.compile-expr-instructions(
          expr: $6.value,
          env: $2,
          depth: $3,
          fn_base: @core.call-argument-fn-base(arguments: $0, name: $6.name, base: $4, index: 0),
          ctx: $5
        ),
        right: @core.compile-call-arguments-ranked(arguments: $0, rank: @core.plus(left: $1, right: 1), env: $2, depth: $3, fn_base: $4, ctx: $5)
      )
  }
visibility
public
core.compile-call-arguments-ranked (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204)
id: qPPtXQocGcZjtzYddAId5DJIJYBDKwebr9e7yIH1npI
content hash: zqUSk2QTLNGR1u6u2yKtTzFmByU5X1YhRcf9cMGckgY