diff --git a/compiler/src/middle_end/linearize.re b/compiler/src/middle_end/linearize.re index d551b6a40..8e7624bd6 100644 --- a/compiler/src/middle_end/linearize.re +++ b/compiler/src/middle_end/linearize.re @@ -266,6 +266,42 @@ let reorder_arguments = (args, order) => { List.rev(reorder([], args, order)); }; +type constuctor_meta = { + imm_type_hash: imm_expression, + imm_tytag: imm_expression, + imm_tag: imm_expression, +}; + +let constructor_meta = (~loc, ~env, typ, cstr_tag) => { + let (_, typath, tydecl) = Ctype.extract_concrete_typedecl(env, typ); + let ty_id = get_type_id(typath, env); + let compiled_tag = compile_constructor_tag(cstr_tag); + let type_hash = + switch (cstr_tag) { + | CstrExtension(_) => exception_type_hash + | _ => get_type_hash(tydecl) + }; + let imm_type_hash = + Imm.const( + ~loc, + ~env, + Const_number(Const_number_int(Int64.of_int(type_hash))), + ); + let imm_tytag = + Imm.const( + ~loc, + ~env, + Const_number(Const_number_int(Int64.of_int(ty_id))), + ); + let imm_tag = + Imm.const( + ~loc, + ~env, + Const_number(Const_number_int(Int64.of_int(compiled_tag))), + ); + {imm_type_hash, imm_tytag, imm_tag}; +}; + let transl_const = (~loc=Location.dummy_loc, ~env=Env.empty, c: Types.constant) : Either.t(imm_expression, (ident, list(anf_bind))) => { @@ -851,8 +887,58 @@ let rec transl_imm = List.concat(new_setup) @ [BLet(tmp, Comp.tuple(~loc, ~env, new_args), Nonglobal)], ); + | TExpList({items: args, spread}) => + let (args, arg_setup) = List.split(List.map(transl_imm, args)); + let (spread_arg, spread_setup) = + switch (spread) { + | Some(imm) => transl_imm(imm) + | None => + let empty = + Env.find_constructor(PIdent(Builtin_types.ident_empty_cstr), env); + let {imm_type_hash, imm_tytag, imm_tag} = + constructor_meta(~loc, ~env, typ, empty.cstr_tag); + let cstr = gensym("empty"); + ( + Imm.id(~loc, ~env, cstr), + [ + BLet( + cstr, + Comp.adt(~loc, ~env, imm_type_hash, imm_tytag, imm_tag, []), + Nonglobal, + ), + ], + ); + }; + let cons = + Env.find_constructor(PIdent(Builtin_types.ident_cons_cstr), env); + let {imm_type_hash, imm_tytag, imm_tag} = + constructor_meta(~loc, ~env, typ, cons.cstr_tag); + let (list_imm, list_setup) = + List.fold_left_map( + (rest_imm, arg) => { + let cstr = gensym("cons"); + ( + Imm.id(~loc, ~env, cstr), + BLet( + cstr, + Comp.adt( + ~loc, + ~env, + imm_type_hash, + imm_tytag, + imm_tag, + [arg, rest_imm], + ), + Nonglobal, + ), + ); + }, + spread_arg, + List.rev(args), + ); + (list_imm, List.concat(arg_setup) @ spread_setup @ list_setup); | TExpArray(args) => - let tmp = gensym("tup"); + let tmp = gensym("array"); let (new_args, new_setup) = List.split(List.map(transl_imm, args)); ( Imm.id(~loc, ~env, tmp), @@ -1065,9 +1151,6 @@ let rec transl_imm = ); | TExpConstruct(_, {cstr_name, cstr_tag}, arg) => let tmp = gensym("adt"); - let (_, typath, tydecl) = Ctype.extract_concrete_typedecl(env, typ); - let ty_id = get_type_id(typath, env); - let compiled_tag = compile_constructor_tag(cstr_tag); let (new_args, new_setup) = switch (arg) { | TExpConstrRecord(fields) => @@ -1084,29 +1167,8 @@ let rec transl_imm = ) | TExpConstrTuple(args) => List.split(List.map(transl_imm, args)) }; - let type_hash = - switch (cstr_tag) { - | CstrExtension(_) => exception_type_hash - | _ => get_type_hash(tydecl) - }; - let imm_type_hash = - Imm.const( - ~loc, - ~env, - Const_number(Const_number_int(Int64.of_int(type_hash))), - ); - let imm_tytag = - Imm.const( - ~loc, - ~env, - Const_number(Const_number_int(Int64.of_int(ty_id))), - ); - let imm_tag = - Imm.const( - ~loc, - ~env, - Const_number(Const_number_int(Int64.of_int(compiled_tag))), - ); + let {imm_type_hash, imm_tytag, imm_tag} = + constructor_meta(~loc, ~env, typ, cstr_tag); let adt = Comp.adt(~loc, ~env, imm_type_hash, imm_tytag, imm_tag, new_args); ( diff --git a/compiler/src/typed/typecore.re b/compiler/src/typed/typecore.re index 37fb66c68..4dea4790e 100644 --- a/compiler/src/typed/typecore.re +++ b/compiler/src/typed/typecore.re @@ -802,7 +802,6 @@ and type_expect_ = (~in_function=?, ~recarg=Rejected, env, sexp, ty_expected_explained) => { let {ty: ty_expected, explanation} = ty_expected_explained; let loc = sexp.pexp_loc; - let core_loc = sexp.pexp_core_loc; let attributes = Typetexp.type_attributes(sexp.pexp_attributes); /* Record the expression type before unifying it with the expected type */ let type_expect = type_expect(~in_function?); @@ -863,57 +862,51 @@ and type_expect_ = exp_env: env, }); | PExpList(es) => - let convert_list = (~loc, ~core_loc, ~attributes=?, a) => { - open Ast_helper; - let empty = - Expression.tuple_construct(~loc, ~core_loc, ident_empty, []); - let list = - switch (List.rev(a)) { - | [] => empty - | [base, ...rest] => - let base = - switch (base) { - | ListItem(expr) => - Expression.tuple_construct( - ~loc, - ~core_loc, - ~attributes?, - ident_cons, - [expr, empty], - ) - | ListSpread(expr, _) => expr - }; + let (args, spread) = + switch (List.rev(es)) { + | [] => ([], None) + | [base, ...rest] => + let (items, spread) = + switch (base) { + | ListItem(expr) => ([expr], None) + | ListSpread(expr, _) => ([], Some(expr)) + }; + let items = List.fold_left( - (acc, expr) => { - switch (expr) { - | ListItem(expr) => - Expression.tuple_construct( - ~loc, - ~core_loc, - ~attributes?, - ident_cons, - [expr, acc], - ) + (items, arg) => + switch (arg) { + | ListItem(expr) => [expr, ...items] | ListSpread(_, loc) => raise( - SyntaxError( + Ast_helper.SyntaxError( loc, "A list spread can only appear at the end of a list.", ), ) - } - }, - base, + }, + items, rest, ); - }; - {...list, pexp_loc: loc}; - }; - type_expect( - env, - convert_list(~loc, ~core_loc, ~attributes=sexp.pexp_attributes, es), - ty_expected_explained, - ); + (items, spread); + }; + let ty = newgenvar(); + let to_unify = Builtin_types.type_list(ty); + with_explanation(() => unify_exp_types(loc, env, to_unify, ty_expected)); + let items = + List.map(sarg => type_expect(env, sarg, mk_expected(ty)), args); + let spread = + Option.map( + expr => type_expect(env, expr, mk_expected(to_unify)), + spread, + ); + re({ + exp_desc: TExpList({items, spread}), + exp_loc: loc, + exp_extra: [], + exp_attributes: attributes, + exp_type: instance(env, ty_expected), + exp_env: env, + }); | PExpArray(es) => let ty = newgenvar(); let to_unify = Builtin_types.type_array(ty); diff --git a/compiler/src/typed/typedtree.re b/compiler/src/typed/typedtree.re index 5b37cd769..ba60e94c3 100644 --- a/compiler/src/typed/typedtree.re +++ b/compiler/src/typed/typedtree.re @@ -465,6 +465,10 @@ and expression_desc = | TExpIdent(Path.t, loc(Identifier.t), Types.value_description) | TExpConstant(constant) | TExpTuple(list(expression)) + | TExpList({ + items: list(expression), + spread: option(expression), + }) | TExpArray(list(expression)) | TExpArrayGet(expression, expression) | TExpArraySet({ diff --git a/compiler/src/typed/typedtree.rei b/compiler/src/typed/typedtree.rei index 210af5f6c..c5556ff82 100644 --- a/compiler/src/typed/typedtree.rei +++ b/compiler/src/typed/typedtree.rei @@ -432,6 +432,10 @@ and expression_desc = | TExpIdent(Path.t, loc(Identifier.t), Types.value_description) | TExpConstant(constant) | TExpTuple(list(expression)) + | TExpList({ + items: list(expression), + spread: option(expression), + }) | TExpArray(list(expression)) | TExpArrayGet(expression, expression) | TExpArraySet({ diff --git a/compiler/src/typed/typedtreeIter.re b/compiler/src/typed/typedtreeIter.re index 557021ab9..585477558 100644 --- a/compiler/src/typed/typedtreeIter.re +++ b/compiler/src/typed/typedtreeIter.re @@ -233,6 +233,9 @@ module MakeIterator = | TExpRecordSet(e1, _, _, e2) => iter_expression(e1); iter_expression(e2); + | TExpList({items: args, spread}) => + List.iter(iter_expression, args); + Option.iter(iter_expression, spread); | TExpTuple(args) | TExpArray(args) | TExpBlock(args) diff --git a/compiler/src/typed/typedtreeMap.re b/compiler/src/typed/typedtreeMap.re index ee056b314..75cec03ea 100644 --- a/compiler/src/typed/typedtreeMap.re +++ b/compiler/src/typed/typedtreeMap.re @@ -232,6 +232,11 @@ module MakeMap = | TExpMatch(value, branches, p) => TExpMatch(map_expression(value), map_match_branches(branches), p) | TExpTuple(args) => TExpTuple(List.map(map_expression, args)) + | TExpList({items, spread}) => + TExpList({ + items: List.map(map_expression, items), + spread: Option.map(map_expression, spread), + }) | TExpArray(args) => TExpArray(List.map(map_expression, args)) | TExpArrayGet(a1, a2) => TExpArrayGet(map_expression(a1), map_expression(a2)) diff --git a/compiler/test/__snapshots__/lists.4cfe47d3.0.snapshot b/compiler/test/__snapshots__/lists.4cfe47d3.0.snapshot new file mode 100644 index 000000000..3ef6e1b8d --- /dev/null +++ b/compiler/test/__snapshots__/lists.4cfe47d3.0.snapshot @@ -0,0 +1,4193 @@ +lists › list_large1 +(module + (type $none_=>_i32 (func (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (import \"_genv\" \"tbl\" (table $tbl 0 funcref)) + (import \"_genv\" \"relocBase\" (global $relocBase_0 i32)) + (import \"_genv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32)) + (import \"_genv\" \"runtimeHeapStart\" (global $runtimeHeapStart_0 i32)) + (import \"_genv\" \"runtimeHeapNextPtr\" (global $runtimeHeapNextPtr_0 (mut i32))) + (import \"_genv\" \"metadataPtr\" (global $metadataPtr_0 i32)) + (import \"GRAIN$MODULE$runtime/gc.gr\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32))) + (import \"GRAIN$MODULE$runtime/gc.gr\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32))) + (global $GRAIN$TABLE_SIZE i32 (i32.const 0)) + (memory $0 0) + (elem $elem (global.get $relocBase_0)) + (export \"memory\" (memory $0)) + (export \"_gmain\" (func $_gmain)) + (export \"_start\" (func $_start)) + (export \"GRAIN$TABLE_SIZE\" (global $GRAIN$TABLE_SIZE)) + (func $_gmain (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i64) + (local $4 f32) + (local $5 f64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local $26 i32) + (local $27 i32) + (local $28 i32) + (local $29 i32) + (local $30 i32) + (local $31 i32) + (local $32 i32) + (local $33 i32) + (local $34 i32) + (local $35 i32) + (local $36 i32) + (local $37 i32) + (local $38 i32) + (local $39 i32) + (local $40 i32) + (local $41 i32) + (local $42 i32) + (local $43 i32) + (local $44 i32) + (local $45 i32) + (local $46 i32) + (local $47 i32) + (local $48 i32) + (local $49 i32) + (local $50 i32) + (local $51 i32) + (local $52 i32) + (local $53 i32) + (local $54 i32) + (local $55 i32) + (local $56 i32) + (local $57 i32) + (local $58 i32) + (local $59 i32) + (local $60 i32) + (local $61 i32) + (local $62 i32) + (local $63 i32) + (local $64 i32) + (local $65 i32) + (local $66 i32) + (local $67 i32) + (local $68 i32) + (local $69 i32) + (local $70 i32) + (local $71 i32) + (local $72 i32) + (local $73 i32) + (local $74 i32) + (local $75 i32) + (local $76 i32) + (local $77 i32) + (local $78 i32) + (local $79 i32) + (local $80 i32) + (local $81 i32) + (local $82 i32) + (local $83 i32) + (local $84 i32) + (local $85 i32) + (local $86 i32) + (local $87 i32) + (local $88 i32) + (local $89 i32) + (local $90 i32) + (local $91 i32) + (local $92 i32) + (local $93 i32) + (local $94 i32) + (local $95 i32) + (local $96 i32) + (local $97 i32) + (local $98 i32) + (local $99 i32) + (local $100 i32) + (local $101 i32) + (block $compile_block.290 (result i32) + (block $compile_store.3 + (local.set $6 + (block $allocate_adt.1 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 20) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 3) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 0) + ) + (local.get $0) + ) + ) + (block $do_backpatches.2 + ) + ) + (block $compile_store.6 + (local.set $7 + (block $allocate_adt.4 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 193) + ) + (i32.store offset=24 + (local.get $0) + (local.get $6) + ) + (local.get $0) + ) + ) + (block $do_backpatches.5 + ) + ) + (block $compile_store.9 + (local.set $8 + (block $allocate_adt.7 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 191) + ) + (i32.store offset=24 + (local.get $0) + (local.get $7) + ) + (local.get $0) + ) + ) + (block $do_backpatches.8 + ) + ) + (block $compile_store.12 + (local.set $9 + (block $allocate_adt.10 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 189) + ) + (i32.store offset=24 + (local.get $0) + (local.get $8) + ) + (local.get $0) + ) + ) + (block $do_backpatches.11 + ) + ) + (block $compile_store.15 + (local.set $10 + (block $allocate_adt.13 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 187) + ) + (i32.store offset=24 + (local.get $0) + (local.get $9) + ) + (local.get $0) + ) + ) + (block $do_backpatches.14 + ) + ) + (block $compile_store.18 + (local.set $11 + (block $allocate_adt.16 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 185) + ) + (i32.store offset=24 + (local.get $0) + (local.get $10) + ) + (local.get $0) + ) + ) + (block $do_backpatches.17 + ) + ) + (block $compile_store.21 + (local.set $12 + (block $allocate_adt.19 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 183) + ) + (i32.store offset=24 + (local.get $0) + (local.get $11) + ) + (local.get $0) + ) + ) + (block $do_backpatches.20 + ) + ) + (block $compile_store.24 + (local.set $13 + (block $allocate_adt.22 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 181) + ) + (i32.store offset=24 + (local.get $0) + (local.get $12) + ) + (local.get $0) + ) + ) + (block $do_backpatches.23 + ) + ) + (block $compile_store.27 + (local.set $14 + (block $allocate_adt.25 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 179) + ) + (i32.store offset=24 + (local.get $0) + (local.get $13) + ) + (local.get $0) + ) + ) + (block $do_backpatches.26 + ) + ) + (block $compile_store.30 + (local.set $15 + (block $allocate_adt.28 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 177) + ) + (i32.store offset=24 + (local.get $0) + (local.get $14) + ) + (local.get $0) + ) + ) + (block $do_backpatches.29 + ) + ) + (block $compile_store.33 + (local.set $16 + (block $allocate_adt.31 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 175) + ) + (i32.store offset=24 + (local.get $0) + (local.get $15) + ) + (local.get $0) + ) + ) + (block $do_backpatches.32 + ) + ) + (block $compile_store.36 + (local.set $17 + (block $allocate_adt.34 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 173) + ) + (i32.store offset=24 + (local.get $0) + (local.get $16) + ) + (local.get $0) + ) + ) + (block $do_backpatches.35 + ) + ) + (block $compile_store.39 + (local.set $18 + (block $allocate_adt.37 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 171) + ) + (i32.store offset=24 + (local.get $0) + (local.get $17) + ) + (local.get $0) + ) + ) + (block $do_backpatches.38 + ) + ) + (block $compile_store.42 + (local.set $19 + (block $allocate_adt.40 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 169) + ) + (i32.store offset=24 + (local.get $0) + (local.get $18) + ) + (local.get $0) + ) + ) + (block $do_backpatches.41 + ) + ) + (block $compile_store.45 + (local.set $20 + (block $allocate_adt.43 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 167) + ) + (i32.store offset=24 + (local.get $0) + (local.get $19) + ) + (local.get $0) + ) + ) + (block $do_backpatches.44 + ) + ) + (block $compile_store.48 + (local.set $21 + (block $allocate_adt.46 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 165) + ) + (i32.store offset=24 + (local.get $0) + (local.get $20) + ) + (local.get $0) + ) + ) + (block $do_backpatches.47 + ) + ) + (block $compile_store.51 + (local.set $22 + (block $allocate_adt.49 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 163) + ) + (i32.store offset=24 + (local.get $0) + (local.get $21) + ) + (local.get $0) + ) + ) + (block $do_backpatches.50 + ) + ) + (block $compile_store.54 + (local.set $23 + (block $allocate_adt.52 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 161) + ) + (i32.store offset=24 + (local.get $0) + (local.get $22) + ) + (local.get $0) + ) + ) + (block $do_backpatches.53 + ) + ) + (block $compile_store.57 + (local.set $24 + (block $allocate_adt.55 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 159) + ) + (i32.store offset=24 + (local.get $0) + (local.get $23) + ) + (local.get $0) + ) + ) + (block $do_backpatches.56 + ) + ) + (block $compile_store.60 + (local.set $25 + (block $allocate_adt.58 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 157) + ) + (i32.store offset=24 + (local.get $0) + (local.get $24) + ) + (local.get $0) + ) + ) + (block $do_backpatches.59 + ) + ) + (block $compile_store.63 + (local.set $26 + (block $allocate_adt.61 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 155) + ) + (i32.store offset=24 + (local.get $0) + (local.get $25) + ) + (local.get $0) + ) + ) + (block $do_backpatches.62 + ) + ) + (block $compile_store.66 + (local.set $27 + (block $allocate_adt.64 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 153) + ) + (i32.store offset=24 + (local.get $0) + (local.get $26) + ) + (local.get $0) + ) + ) + (block $do_backpatches.65 + ) + ) + (block $compile_store.69 + (local.set $28 + (block $allocate_adt.67 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 151) + ) + (i32.store offset=24 + (local.get $0) + (local.get $27) + ) + (local.get $0) + ) + ) + (block $do_backpatches.68 + ) + ) + (block $compile_store.72 + (local.set $29 + (block $allocate_adt.70 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 149) + ) + (i32.store offset=24 + (local.get $0) + (local.get $28) + ) + (local.get $0) + ) + ) + (block $do_backpatches.71 + ) + ) + (block $compile_store.75 + (local.set $30 + (block $allocate_adt.73 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 147) + ) + (i32.store offset=24 + (local.get $0) + (local.get $29) + ) + (local.get $0) + ) + ) + (block $do_backpatches.74 + ) + ) + (block $compile_store.78 + (local.set $31 + (block $allocate_adt.76 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 145) + ) + (i32.store offset=24 + (local.get $0) + (local.get $30) + ) + (local.get $0) + ) + ) + (block $do_backpatches.77 + ) + ) + (block $compile_store.81 + (local.set $32 + (block $allocate_adt.79 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 143) + ) + (i32.store offset=24 + (local.get $0) + (local.get $31) + ) + (local.get $0) + ) + ) + (block $do_backpatches.80 + ) + ) + (block $compile_store.84 + (local.set $33 + (block $allocate_adt.82 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 141) + ) + (i32.store offset=24 + (local.get $0) + (local.get $32) + ) + (local.get $0) + ) + ) + (block $do_backpatches.83 + ) + ) + (block $compile_store.87 + (local.set $34 + (block $allocate_adt.85 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 139) + ) + (i32.store offset=24 + (local.get $0) + (local.get $33) + ) + (local.get $0) + ) + ) + (block $do_backpatches.86 + ) + ) + (block $compile_store.90 + (local.set $35 + (block $allocate_adt.88 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 137) + ) + (i32.store offset=24 + (local.get $0) + (local.get $34) + ) + (local.get $0) + ) + ) + (block $do_backpatches.89 + ) + ) + (block $compile_store.93 + (local.set $36 + (block $allocate_adt.91 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 135) + ) + (i32.store offset=24 + (local.get $0) + (local.get $35) + ) + (local.get $0) + ) + ) + (block $do_backpatches.92 + ) + ) + (block $compile_store.96 + (local.set $37 + (block $allocate_adt.94 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 133) + ) + (i32.store offset=24 + (local.get $0) + (local.get $36) + ) + (local.get $0) + ) + ) + (block $do_backpatches.95 + ) + ) + (block $compile_store.99 + (local.set $38 + (block $allocate_adt.97 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 131) + ) + (i32.store offset=24 + (local.get $0) + (local.get $37) + ) + (local.get $0) + ) + ) + (block $do_backpatches.98 + ) + ) + (block $compile_store.102 + (local.set $39 + (block $allocate_adt.100 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 129) + ) + (i32.store offset=24 + (local.get $0) + (local.get $38) + ) + (local.get $0) + ) + ) + (block $do_backpatches.101 + ) + ) + (block $compile_store.105 + (local.set $40 + (block $allocate_adt.103 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 127) + ) + (i32.store offset=24 + (local.get $0) + (local.get $39) + ) + (local.get $0) + ) + ) + (block $do_backpatches.104 + ) + ) + (block $compile_store.108 + (local.set $41 + (block $allocate_adt.106 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 125) + ) + (i32.store offset=24 + (local.get $0) + (local.get $40) + ) + (local.get $0) + ) + ) + (block $do_backpatches.107 + ) + ) + (block $compile_store.111 + (local.set $42 + (block $allocate_adt.109 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 123) + ) + (i32.store offset=24 + (local.get $0) + (local.get $41) + ) + (local.get $0) + ) + ) + (block $do_backpatches.110 + ) + ) + (block $compile_store.114 + (local.set $43 + (block $allocate_adt.112 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 121) + ) + (i32.store offset=24 + (local.get $0) + (local.get $42) + ) + (local.get $0) + ) + ) + (block $do_backpatches.113 + ) + ) + (block $compile_store.117 + (local.set $44 + (block $allocate_adt.115 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 119) + ) + (i32.store offset=24 + (local.get $0) + (local.get $43) + ) + (local.get $0) + ) + ) + (block $do_backpatches.116 + ) + ) + (block $compile_store.120 + (local.set $45 + (block $allocate_adt.118 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 117) + ) + (i32.store offset=24 + (local.get $0) + (local.get $44) + ) + (local.get $0) + ) + ) + (block $do_backpatches.119 + ) + ) + (block $compile_store.123 + (local.set $46 + (block $allocate_adt.121 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 115) + ) + (i32.store offset=24 + (local.get $0) + (local.get $45) + ) + (local.get $0) + ) + ) + (block $do_backpatches.122 + ) + ) + (block $compile_store.126 + (local.set $47 + (block $allocate_adt.124 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 113) + ) + (i32.store offset=24 + (local.get $0) + (local.get $46) + ) + (local.get $0) + ) + ) + (block $do_backpatches.125 + ) + ) + (block $compile_store.129 + (local.set $48 + (block $allocate_adt.127 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 111) + ) + (i32.store offset=24 + (local.get $0) + (local.get $47) + ) + (local.get $0) + ) + ) + (block $do_backpatches.128 + ) + ) + (block $compile_store.132 + (local.set $49 + (block $allocate_adt.130 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 109) + ) + (i32.store offset=24 + (local.get $0) + (local.get $48) + ) + (local.get $0) + ) + ) + (block $do_backpatches.131 + ) + ) + (block $compile_store.135 + (local.set $50 + (block $allocate_adt.133 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 107) + ) + (i32.store offset=24 + (local.get $0) + (local.get $49) + ) + (local.get $0) + ) + ) + (block $do_backpatches.134 + ) + ) + (block $compile_store.138 + (local.set $51 + (block $allocate_adt.136 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 105) + ) + (i32.store offset=24 + (local.get $0) + (local.get $50) + ) + (local.get $0) + ) + ) + (block $do_backpatches.137 + ) + ) + (block $compile_store.141 + (local.set $52 + (block $allocate_adt.139 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 103) + ) + (i32.store offset=24 + (local.get $0) + (local.get $51) + ) + (local.get $0) + ) + ) + (block $do_backpatches.140 + ) + ) + (block $compile_store.144 + (local.set $53 + (block $allocate_adt.142 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 101) + ) + (i32.store offset=24 + (local.get $0) + (local.get $52) + ) + (local.get $0) + ) + ) + (block $do_backpatches.143 + ) + ) + (block $compile_store.147 + (local.set $54 + (block $allocate_adt.145 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 99) + ) + (i32.store offset=24 + (local.get $0) + (local.get $53) + ) + (local.get $0) + ) + ) + (block $do_backpatches.146 + ) + ) + (block $compile_store.150 + (local.set $55 + (block $allocate_adt.148 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 97) + ) + (i32.store offset=24 + (local.get $0) + (local.get $54) + ) + (local.get $0) + ) + ) + (block $do_backpatches.149 + ) + ) + (block $compile_store.153 + (local.set $56 + (block $allocate_adt.151 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 95) + ) + (i32.store offset=24 + (local.get $0) + (local.get $55) + ) + (local.get $0) + ) + ) + (block $do_backpatches.152 + ) + ) + (block $compile_store.156 + (local.set $57 + (block $allocate_adt.154 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 93) + ) + (i32.store offset=24 + (local.get $0) + (local.get $56) + ) + (local.get $0) + ) + ) + (block $do_backpatches.155 + ) + ) + (block $compile_store.159 + (local.set $58 + (block $allocate_adt.157 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 91) + ) + (i32.store offset=24 + (local.get $0) + (local.get $57) + ) + (local.get $0) + ) + ) + (block $do_backpatches.158 + ) + ) + (block $compile_store.162 + (local.set $59 + (block $allocate_adt.160 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 89) + ) + (i32.store offset=24 + (local.get $0) + (local.get $58) + ) + (local.get $0) + ) + ) + (block $do_backpatches.161 + ) + ) + (block $compile_store.165 + (local.set $60 + (block $allocate_adt.163 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 87) + ) + (i32.store offset=24 + (local.get $0) + (local.get $59) + ) + (local.get $0) + ) + ) + (block $do_backpatches.164 + ) + ) + (block $compile_store.168 + (local.set $61 + (block $allocate_adt.166 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 85) + ) + (i32.store offset=24 + (local.get $0) + (local.get $60) + ) + (local.get $0) + ) + ) + (block $do_backpatches.167 + ) + ) + (block $compile_store.171 + (local.set $62 + (block $allocate_adt.169 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 83) + ) + (i32.store offset=24 + (local.get $0) + (local.get $61) + ) + (local.get $0) + ) + ) + (block $do_backpatches.170 + ) + ) + (block $compile_store.174 + (local.set $63 + (block $allocate_adt.172 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 81) + ) + (i32.store offset=24 + (local.get $0) + (local.get $62) + ) + (local.get $0) + ) + ) + (block $do_backpatches.173 + ) + ) + (block $compile_store.177 + (local.set $64 + (block $allocate_adt.175 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 79) + ) + (i32.store offset=24 + (local.get $0) + (local.get $63) + ) + (local.get $0) + ) + ) + (block $do_backpatches.176 + ) + ) + (block $compile_store.180 + (local.set $65 + (block $allocate_adt.178 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 77) + ) + (i32.store offset=24 + (local.get $0) + (local.get $64) + ) + (local.get $0) + ) + ) + (block $do_backpatches.179 + ) + ) + (block $compile_store.183 + (local.set $66 + (block $allocate_adt.181 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 75) + ) + (i32.store offset=24 + (local.get $0) + (local.get $65) + ) + (local.get $0) + ) + ) + (block $do_backpatches.182 + ) + ) + (block $compile_store.186 + (local.set $67 + (block $allocate_adt.184 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 73) + ) + (i32.store offset=24 + (local.get $0) + (local.get $66) + ) + (local.get $0) + ) + ) + (block $do_backpatches.185 + ) + ) + (block $compile_store.189 + (local.set $68 + (block $allocate_adt.187 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 71) + ) + (i32.store offset=24 + (local.get $0) + (local.get $67) + ) + (local.get $0) + ) + ) + (block $do_backpatches.188 + ) + ) + (block $compile_store.192 + (local.set $69 + (block $allocate_adt.190 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 69) + ) + (i32.store offset=24 + (local.get $0) + (local.get $68) + ) + (local.get $0) + ) + ) + (block $do_backpatches.191 + ) + ) + (block $compile_store.195 + (local.set $70 + (block $allocate_adt.193 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 67) + ) + (i32.store offset=24 + (local.get $0) + (local.get $69) + ) + (local.get $0) + ) + ) + (block $do_backpatches.194 + ) + ) + (block $compile_store.198 + (local.set $71 + (block $allocate_adt.196 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 65) + ) + (i32.store offset=24 + (local.get $0) + (local.get $70) + ) + (local.get $0) + ) + ) + (block $do_backpatches.197 + ) + ) + (block $compile_store.201 + (local.set $72 + (block $allocate_adt.199 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 63) + ) + (i32.store offset=24 + (local.get $0) + (local.get $71) + ) + (local.get $0) + ) + ) + (block $do_backpatches.200 + ) + ) + (block $compile_store.204 + (local.set $73 + (block $allocate_adt.202 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 61) + ) + (i32.store offset=24 + (local.get $0) + (local.get $72) + ) + (local.get $0) + ) + ) + (block $do_backpatches.203 + ) + ) + (block $compile_store.207 + (local.set $74 + (block $allocate_adt.205 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 59) + ) + (i32.store offset=24 + (local.get $0) + (local.get $73) + ) + (local.get $0) + ) + ) + (block $do_backpatches.206 + ) + ) + (block $compile_store.210 + (local.set $75 + (block $allocate_adt.208 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 57) + ) + (i32.store offset=24 + (local.get $0) + (local.get $74) + ) + (local.get $0) + ) + ) + (block $do_backpatches.209 + ) + ) + (block $compile_store.213 + (local.set $76 + (block $allocate_adt.211 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 55) + ) + (i32.store offset=24 + (local.get $0) + (local.get $75) + ) + (local.get $0) + ) + ) + (block $do_backpatches.212 + ) + ) + (block $compile_store.216 + (local.set $77 + (block $allocate_adt.214 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 53) + ) + (i32.store offset=24 + (local.get $0) + (local.get $76) + ) + (local.get $0) + ) + ) + (block $do_backpatches.215 + ) + ) + (block $compile_store.219 + (local.set $78 + (block $allocate_adt.217 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 51) + ) + (i32.store offset=24 + (local.get $0) + (local.get $77) + ) + (local.get $0) + ) + ) + (block $do_backpatches.218 + ) + ) + (block $compile_store.222 + (local.set $79 + (block $allocate_adt.220 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 49) + ) + (i32.store offset=24 + (local.get $0) + (local.get $78) + ) + (local.get $0) + ) + ) + (block $do_backpatches.221 + ) + ) + (block $compile_store.225 + (local.set $80 + (block $allocate_adt.223 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 47) + ) + (i32.store offset=24 + (local.get $0) + (local.get $79) + ) + (local.get $0) + ) + ) + (block $do_backpatches.224 + ) + ) + (block $compile_store.228 + (local.set $81 + (block $allocate_adt.226 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 45) + ) + (i32.store offset=24 + (local.get $0) + (local.get $80) + ) + (local.get $0) + ) + ) + (block $do_backpatches.227 + ) + ) + (block $compile_store.231 + (local.set $82 + (block $allocate_adt.229 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 43) + ) + (i32.store offset=24 + (local.get $0) + (local.get $81) + ) + (local.get $0) + ) + ) + (block $do_backpatches.230 + ) + ) + (block $compile_store.234 + (local.set $83 + (block $allocate_adt.232 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 41) + ) + (i32.store offset=24 + (local.get $0) + (local.get $82) + ) + (local.get $0) + ) + ) + (block $do_backpatches.233 + ) + ) + (block $compile_store.237 + (local.set $84 + (block $allocate_adt.235 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 39) + ) + (i32.store offset=24 + (local.get $0) + (local.get $83) + ) + (local.get $0) + ) + ) + (block $do_backpatches.236 + ) + ) + (block $compile_store.240 + (local.set $85 + (block $allocate_adt.238 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 37) + ) + (i32.store offset=24 + (local.get $0) + (local.get $84) + ) + (local.get $0) + ) + ) + (block $do_backpatches.239 + ) + ) + (block $compile_store.243 + (local.set $86 + (block $allocate_adt.241 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 35) + ) + (i32.store offset=24 + (local.get $0) + (local.get $85) + ) + (local.get $0) + ) + ) + (block $do_backpatches.242 + ) + ) + (block $compile_store.246 + (local.set $87 + (block $allocate_adt.244 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 33) + ) + (i32.store offset=24 + (local.get $0) + (local.get $86) + ) + (local.get $0) + ) + ) + (block $do_backpatches.245 + ) + ) + (block $compile_store.249 + (local.set $88 + (block $allocate_adt.247 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 31) + ) + (i32.store offset=24 + (local.get $0) + (local.get $87) + ) + (local.get $0) + ) + ) + (block $do_backpatches.248 + ) + ) + (block $compile_store.252 + (local.set $89 + (block $allocate_adt.250 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 29) + ) + (i32.store offset=24 + (local.get $0) + (local.get $88) + ) + (local.get $0) + ) + ) + (block $do_backpatches.251 + ) + ) + (block $compile_store.255 + (local.set $90 + (block $allocate_adt.253 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 27) + ) + (i32.store offset=24 + (local.get $0) + (local.get $89) + ) + (local.get $0) + ) + ) + (block $do_backpatches.254 + ) + ) + (block $compile_store.258 + (local.set $91 + (block $allocate_adt.256 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 25) + ) + (i32.store offset=24 + (local.get $0) + (local.get $90) + ) + (local.get $0) + ) + ) + (block $do_backpatches.257 + ) + ) + (block $compile_store.261 + (local.set $92 + (block $allocate_adt.259 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 23) + ) + (i32.store offset=24 + (local.get $0) + (local.get $91) + ) + (local.get $0) + ) + ) + (block $do_backpatches.260 + ) + ) + (block $compile_store.264 + (local.set $93 + (block $allocate_adt.262 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 21) + ) + (i32.store offset=24 + (local.get $0) + (local.get $92) + ) + (local.get $0) + ) + ) + (block $do_backpatches.263 + ) + ) + (block $compile_store.267 + (local.set $94 + (block $allocate_adt.265 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 19) + ) + (i32.store offset=24 + (local.get $0) + (local.get $93) + ) + (local.get $0) + ) + ) + (block $do_backpatches.266 + ) + ) + (block $compile_store.270 + (local.set $95 + (block $allocate_adt.268 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 17) + ) + (i32.store offset=24 + (local.get $0) + (local.get $94) + ) + (local.get $0) + ) + ) + (block $do_backpatches.269 + ) + ) + (block $compile_store.273 + (local.set $96 + (block $allocate_adt.271 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 15) + ) + (i32.store offset=24 + (local.get $0) + (local.get $95) + ) + (local.get $0) + ) + ) + (block $do_backpatches.272 + ) + ) + (block $compile_store.276 + (local.set $97 + (block $allocate_adt.274 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 13) + ) + (i32.store offset=24 + (local.get $0) + (local.get $96) + ) + (local.get $0) + ) + ) + (block $do_backpatches.275 + ) + ) + (block $compile_store.279 + (local.set $98 + (block $allocate_adt.277 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=24 + (local.get $0) + (local.get $97) + ) + (local.get $0) + ) + ) + (block $do_backpatches.278 + ) + ) + (block $compile_store.282 + (local.set $99 + (block $allocate_adt.280 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 9) + ) + (i32.store offset=24 + (local.get $0) + (local.get $98) + ) + (local.get $0) + ) + ) + (block $do_backpatches.281 + ) + ) + (block $compile_store.285 + (local.set $100 + (block $allocate_adt.283 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 7) + ) + (i32.store offset=24 + (local.get $0) + (local.get $99) + ) + (local.get $0) + ) + ) + (block $do_backpatches.284 + ) + ) + (block $compile_store.288 + (local.set $101 + (block $allocate_adt.286 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 5) + ) + (i32.store offset=24 + (local.get $0) + (local.get $100) + ) + (local.get $0) + ) + ) + (block $do_backpatches.287 + ) + ) + (block $allocate_adt.289 (result i32) + (i32.store + (local.tee $0 + (call $malloc_0 + (global.get $GRAIN$EXPORT$malloc_0) + (i32.const 28) + ) + ) + (i32.const 2) + ) + (i32.store offset=4 + (local.get $0) + (i32.const 1638603609) + ) + (i32.store offset=8 + (local.get $0) + (i32.const 11) + ) + (i32.store offset=12 + (local.get $0) + (i32.const 1) + ) + (i32.store offset=16 + (local.get $0) + (i32.const 2) + ) + (i32.store offset=20 + (local.get $0) + (i32.const 3) + ) + (i32.store offset=24 + (local.get $0) + (local.get $101) + ) + (local.get $0) + ) + ) + ) + (func $_start + (drop + (call $_gmain) + ) + ) + ;; custom section \"cmi\", size 368 +) diff --git a/compiler/test/suites/lists.re b/compiler/test/suites/lists.re index 8a63a42b9..90380241c 100644 --- a/compiler/test/suites/lists.re +++ b/compiler/test/suites/lists.re @@ -22,4 +22,14 @@ describe("lists", ({test, testSkip}) => { assertSnapshot("list1_trailing", "[1, 2, 3,]"); assertSnapshot("list1_trailing_space", "[1, 2, 3, ]"); assertCompileError("invalid_empty_trailing", "[,]", "Error: Syntax error"); + + assertSnapshot( + "list_large1", + "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96]", + ); });