Fn(
expr: @core.expression,
depth: 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}>
}
) -> Numberfn(expr$0, depth$1, ctx$2) =>
match $0 {
#function(f$3) =>
@core.plus(left: $1, right: 2),
#part_reference(e$4) =>
let id$5 = $4.part_definition_event_hash;
let found$6 = @core.compile-find-part(parts: $2.part_index, id: $5, index: 0);
match @core.list-get(list: $6, index: 0) {
#none(_) =>
@core.plus(left: $1, right: 2),
#some(item$8161) =>
let target$7 = $8161;
match @core.is-function-expression(expr: $7.expression) {
true =>
@core.plus(left: $1, right: 2),
false =>
match @core.list-contains-string(list: $2.inlining, target: $5, index: 0) {
true =>
@core.plus(left: $1, right: 2),
false =>
let own$8 = @core.plus(left: $1, right: 2);
let inner$10 = @core.max-local(
expr: $7.expression,
depth: $1,
ctx: {
parts: $2.parts,
inlining: @core.list-concat(left: [$5], right: $2.inlining),
strings: $2.strings,
part_index: $2.part_index
}
);
match @core.less-than(left: $8, right: $10) {
true =>
$10,
false =>
$8
}
}
}
},
#quote(quoted$7060) =>
@core.max-local(expr: @core.quote-value(expression: $7060, parts: $2.parts), depth: $1, ctx: $2),
#secret(secret$7160) =>
@core.max-local(
expr: #record<@core.expression>([
{key: "id", value: #string<@core.expression>($7160.id)},
{key: "label", value: #string<@core.expression>($7160.label)}
]),
depth: $1,
ctx: $2
),
#match(match_e$97010) =>
let target_max$97011 = @core.max-local(expr: $97010.target, depth: @core.plus(left: $1, right: 2), ctx: $2);
let arms_max$97012 = @core.max-local-in-arms(arms: $97010.arms, index: 0, depth: $1, ctx: $2);
match @core.less-than(left: $97011, right: $97012) {
true =>
$97012,
false =>
$97011
},
_ =>
let children$9 = @core.expression-children(expr: $0);
let own$8 = @core.plus(left: $1, right: 2);
let inner$10 = @core.max-local-in-range(
items: $9,
lo: 0,
hi: @core.list-length(value: $9),
depth: @core.plus(left: $1, right: 2),
ctx: $2
);
match @core.less-than(left: $8, right: $10) {
true =>
$10,
false =>
$8
}
}