chore(stage0): update

This commit is contained in:
Leonardo de Moura 2019-05-03 19:01:17 -07:00
parent 82d88dc96f
commit 6f971382be
9 changed files with 3687 additions and 843 deletions

View file

@ -1 +1 @@
add_library (stage0 OBJECT ./init/coe.cpp ./init/control/alternative.cpp ./init/control/applicative.cpp ./init/control/combinators.cpp ./init/control/default.cpp ./init/control/estate.cpp ./init/control/except.cpp ./init/control/functor.cpp ./init/control/id.cpp ./init/control/lift.cpp ./init/control/monad.cpp ./init/control/monadfail.cpp ./init/control/option.cpp ./init/control/reader.cpp ./init/control/state.cpp ./init/core.cpp ./init/data/array/basic.cpp ./init/data/array/default.cpp ./init/data/assoclist.cpp ./init/data/basic.cpp ./init/data/char/basic.cpp ./init/data/char/default.cpp ./init/data/default.cpp ./init/data/dlist.cpp ./init/data/fin/basic.cpp ./init/data/fin/default.cpp ./init/data/hashable.cpp ./init/data/hashmap/basic.cpp ./init/data/hashmap/default.cpp ./init/data/int/basic.cpp ./init/data/int/default.cpp ./init/data/list/basic.cpp ./init/data/list/default.cpp ./init/data/list/instances.cpp ./init/data/nat/basic.cpp ./init/data/nat/bitwise.cpp ./init/data/nat/default.cpp ./init/data/nat/div.cpp ./init/data/option/basic.cpp ./init/data/option/instances.cpp ./init/data/ordering/basic.cpp ./init/data/ordering/default.cpp ./init/data/rbmap/basic.cpp ./init/data/rbmap/default.cpp ./init/data/rbtree/basic.cpp ./init/data/rbtree/default.cpp ./init/data/repr.cpp ./init/data/string/basic.cpp ./init/data/string/default.cpp ./init/data/tostring.cpp ./init/data/uint.cpp ./init/default.cpp ./init/env_ext.cpp ./init/fix.cpp ./init/io.cpp ./init/lean/compiler/constfolding.cpp ./init/lean/compiler/default.cpp ./init/lean/compiler/elimdead.cpp ./init/lean/compiler/ir.cpp ./init/lean/compiler/pushproj.cpp ./init/lean/compiler/simpcase.cpp ./init/lean/compiler/util.cpp ./init/lean/config.cpp ./init/lean/declaration.cpp ./init/lean/default.cpp ./init/lean/disjoint_set.cpp ./init/lean/elaborator.cpp ./init/lean/expander.cpp ./init/lean/expr.cpp ./init/lean/extern.cpp ./init/lean/format.cpp ./init/lean/frontend.cpp ./init/lean/kvmap.cpp ./init/lean/level.cpp ./init/lean/message.cpp ./init/lean/name.cpp ./init/lean/name_mangling.cpp ./init/lean/options.cpp ./init/lean/parser/basic.cpp ./init/lean/parser/combinators.cpp ./init/lean/parser/command.cpp ./init/lean/parser/declaration.cpp ./init/lean/parser/identifier.cpp ./init/lean/parser/level.cpp ./init/lean/parser/module.cpp ./init/lean/parser/notation.cpp ./init/lean/parser/parsec.cpp ./init/lean/parser/pratt.cpp ./init/lean/parser/rec.cpp ./init/lean/parser/stringliteral.cpp ./init/lean/parser/syntax.cpp ./init/lean/parser/term.cpp ./init/lean/parser/token.cpp ./init/lean/parser/trie.cpp ./init/lean/position.cpp ./init/lean/trace.cpp ./init/lean/util.cpp ./init/platform.cpp ./init/util.cpp ./init/wf.cpp)
add_library (stage0 OBJECT ./init/coe.cpp ./init/control/alternative.cpp ./init/control/applicative.cpp ./init/control/combinators.cpp ./init/control/default.cpp ./init/control/estate.cpp ./init/control/except.cpp ./init/control/functor.cpp ./init/control/id.cpp ./init/control/lift.cpp ./init/control/monad.cpp ./init/control/monadfail.cpp ./init/control/option.cpp ./init/control/reader.cpp ./init/control/state.cpp ./init/core.cpp ./init/data/array/basic.cpp ./init/data/array/default.cpp ./init/data/assoclist.cpp ./init/data/basic.cpp ./init/data/char/basic.cpp ./init/data/char/default.cpp ./init/data/default.cpp ./init/data/dlist.cpp ./init/data/fin/basic.cpp ./init/data/fin/default.cpp ./init/data/hashable.cpp ./init/data/hashmap/basic.cpp ./init/data/hashmap/default.cpp ./init/data/int/basic.cpp ./init/data/int/default.cpp ./init/data/list/basic.cpp ./init/data/list/default.cpp ./init/data/list/instances.cpp ./init/data/nat/basic.cpp ./init/data/nat/bitwise.cpp ./init/data/nat/default.cpp ./init/data/nat/div.cpp ./init/data/option/basic.cpp ./init/data/option/instances.cpp ./init/data/ordering/basic.cpp ./init/data/ordering/default.cpp ./init/data/rbmap/basic.cpp ./init/data/rbmap/default.cpp ./init/data/rbtree/basic.cpp ./init/data/rbtree/default.cpp ./init/data/repr.cpp ./init/data/string/basic.cpp ./init/data/string/default.cpp ./init/data/tostring.cpp ./init/data/uint.cpp ./init/default.cpp ./init/env_ext.cpp ./init/fix.cpp ./init/io.cpp ./init/lean/compiler/constfolding.cpp ./init/lean/compiler/default.cpp ./init/lean/compiler/elimdead.cpp ./init/lean/compiler/ir.cpp ./init/lean/compiler/pushproj.cpp ./init/lean/compiler/resetreuse.cpp ./init/lean/compiler/simpcase.cpp ./init/lean/compiler/util.cpp ./init/lean/config.cpp ./init/lean/declaration.cpp ./init/lean/default.cpp ./init/lean/disjoint_set.cpp ./init/lean/elaborator.cpp ./init/lean/expander.cpp ./init/lean/expr.cpp ./init/lean/extern.cpp ./init/lean/format.cpp ./init/lean/frontend.cpp ./init/lean/kvmap.cpp ./init/lean/level.cpp ./init/lean/message.cpp ./init/lean/name.cpp ./init/lean/name_mangling.cpp ./init/lean/options.cpp ./init/lean/parser/basic.cpp ./init/lean/parser/combinators.cpp ./init/lean/parser/command.cpp ./init/lean/parser/declaration.cpp ./init/lean/parser/identifier.cpp ./init/lean/parser/level.cpp ./init/lean/parser/module.cpp ./init/lean/parser/notation.cpp ./init/lean/parser/parsec.cpp ./init/lean/parser/pratt.cpp ./init/lean/parser/rec.cpp ./init/lean/parser/stringliteral.cpp ./init/lean/parser/syntax.cpp ./init/lean/parser/term.cpp ./init/lean/parser/token.cpp ./init/lean/parser/trie.cpp ./init/lean/position.cpp ./init/lean/trace.cpp ./init/lean/util.cpp ./init/platform.cpp ./init/util.cpp ./init/wf.cpp)

View file

@ -14,9 +14,12 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64;
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
obj* l_getModify___rarg___lambda__1(obj*, obj*, obj*);
obj* l_getModify___boxed(obj*, obj*);
obj* l_StateT_adapt(obj*, obj*, obj*, obj*, obj*);
obj* l_StateT_adapt___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_MonadStateAdapter_adaptState_x_27___rarg(obj*, obj*, obj*, obj*, obj*);
obj* l_getModify___rarg___lambda__1___boxed(obj*, obj*, obj*);
obj* l_StateT_bind___rarg___lambda__1(obj*, obj*);
obj* l_monadStateAdapterTrans___rarg___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_monadStateRunnerTrans___rarg___lambda__1(obj*, obj*, obj*, obj*);
@ -68,6 +71,7 @@ obj* l_StateT_failure___rarg(obj*, obj*, obj*);
obj* l_StateT_Monad___rarg___lambda__1(obj*, obj*, obj*);
obj* l_StateT_set___rarg(obj*, obj*, obj*);
obj* l_StateT_failure(obj*, obj*, obj*);
obj* l_getModify(obj*, obj*);
obj* l_monadStateRunnerTrans___rarg(obj*, obj*, obj*, obj*, obj*);
obj* l_MonadStateAdapter_adaptState_x_27___boxed(obj*, obj*, obj*, obj*);
obj* l_StateT_MonadExcept___rarg___lambda__2(obj*, obj*, obj*);
@ -79,6 +83,7 @@ obj* l_StateT_MonadExcept(obj*, obj*);
obj* l_monadStateRunnerTrans(obj*, obj*, obj*, obj*, obj*);
obj* l_StateT_HasMonadLift___rarg(obj*);
obj* l_StateT_set___rarg___boxed(obj*, obj*, obj*);
obj* l_getModify___rarg(obj*, obj*, obj*);
obj* l_monadStateAdapterTrans(obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_monadStateTrans___rarg___lambda__2(obj*, obj*, obj*);
obj* l_StateT_MonadStateAdapter___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
@ -107,6 +112,7 @@ obj* l_StateT_set___boxed(obj*, obj*);
obj* l_StateT_run(obj*, obj*, obj*);
obj* l_StateT_MonadRun(obj*, obj*, obj*);
obj* l_StateT_map___boxed(obj*, obj*);
obj* l_getModify___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*);
obj* l_StateT_MonadStateAdapter(obj*, obj*, obj*);
obj* l_StateT_bind(obj*, obj*);
obj* l_StateT_HasMonadLift(obj*, obj*);
@ -1164,6 +1170,80 @@ lean::dec(x_1);
return x_2;
}
}
obj* l_getModify___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; obj* x_6; obj* x_9;
x_3 = lean::cnstr_get(x_0, 0);
lean::inc(x_3);
lean::dec(x_0);
x_6 = lean::cnstr_get(x_3, 1);
lean::inc(x_6);
lean::dec(x_3);
x_9 = lean::apply_2(x_6, lean::box(0), x_1);
return x_9;
}
}
obj* l_getModify___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_5; obj* x_8; obj* x_9; obj* x_10;
x_5 = lean::cnstr_get(x_0, 2);
lean::inc(x_5);
lean::dec(x_0);
x_8 = lean::apply_1(x_5, x_1);
x_9 = lean::alloc_closure(reinterpret_cast<void*>(l_getModify___rarg___lambda__1___boxed), 3, 2);
lean::closure_set(x_9, 0, x_2);
lean::closure_set(x_9, 1, x_4);
x_10 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_8, x_9);
return x_10;
}
}
obj* l_getModify___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; obj* x_5; obj* x_8; obj* x_9;
x_3 = lean::cnstr_get(x_1, 1);
lean::inc(x_3);
x_5 = lean::cnstr_get(x_0, 0);
lean::inc(x_5);
lean::inc(x_3);
x_8 = lean::alloc_closure(reinterpret_cast<void*>(l_getModify___rarg___lambda__2), 5, 4);
lean::closure_set(x_8, 0, x_0);
lean::closure_set(x_8, 1, x_2);
lean::closure_set(x_8, 2, x_1);
lean::closure_set(x_8, 3, x_3);
x_9 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_5, x_8);
return x_9;
}
}
obj* l_getModify(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = lean::alloc_closure(reinterpret_cast<void*>(l_getModify___rarg), 3, 0);
return x_2;
}
}
obj* l_getModify___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = l_getModify___rarg___lambda__1(x_0, x_1, x_2);
lean::dec(x_2);
return x_3;
}
}
obj* l_getModify___boxed(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = l_getModify(x_0, x_1);
lean::dec(x_0);
lean::dec(x_1);
return x_2;
}
}
obj* l_monadStateTrans___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2) {
_start:
{

40
src/stage0/init/io.cpp generated
View file

@ -26,6 +26,7 @@ obj* l_IO_Ref_swap___boxed(obj*, obj*);
obj* l_IO_HasEval(obj*);
obj* l_IO_Ref_modify(obj*);
obj* l_IO_Fs_handle_isEof___rarg(obj*, obj*);
obj* l_getModify___rarg___lambda__1___boxed(obj*, obj*, obj*);
obj* l_IO_Fs_handle_close___rarg(obj*, obj*);
obj* l_IO_Ref_swap(obj*, obj*);
obj* l_EIO_Inhabited___rarg(obj*);
@ -66,7 +67,6 @@ extern "C" obj* lean_io_prim_get_line(obj*);
extern "C" obj* lean_io_allocprof(obj*, obj*, obj*, obj*);
obj* l_IO_Prim_iterate___boxed(obj*, obj*);
obj* l_IO_Ref_set___rarg(obj*, obj*, obj*, obj*);
obj* l_IO_Fs_readFile___rarg___lambda__3(obj*, obj*, obj*, obj*);
obj* l_IO_print___rarg(obj*, obj*, obj*, obj*);
obj* l_IO_userError___boxed(obj*);
obj* l_IO_Prim_getLine___boxed(obj*);
@ -84,7 +84,7 @@ obj* l_IO_mkRef___rarg___boxed(obj*, obj*, obj*);
obj* l_IO_mkRef___rarg(obj*, obj*, obj*);
obj* l_IO_Fs_handle_mk___rarg___boxed(obj*, obj*, obj*, obj*);
obj* l_IO_Prim_iterate(obj*, obj*);
obj* l_IO_Fs_readFile___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*);
obj* l_IO_Fs_readFile___rarg___lambda__2(obj*, obj*, obj*, obj*);
obj* l_unsafeIO___boxed(obj*, obj*);
obj* l_String_HasToString___boxed(obj*);
obj* l_IO_Prim_liftIO(obj*, obj*);
@ -103,9 +103,8 @@ extern "C" obj* lean_io_prim_handle_close(obj*, obj*);
obj* l_IO_Ref_modify___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*);
obj* l_IO_Inhabited___boxed(obj*);
obj* l_IO_mkRef(obj*, obj*);
obj* l_IO_Fs_readFile___rarg___lambda__1(obj*, obj*, obj*);
obj* l_IO_Fs_readFile___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*);
obj* l_IO_Fs_readFile___rarg(obj*, obj*, obj*, uint8);
obj* l_IO_Fs_readFile___rarg___lambda__1___boxed(obj*, obj*, obj*);
obj* l_IO_Fs_handle_mk___boxed(obj*, obj*);
obj* l_IO_mkRef___boxed(obj*, obj*);
obj* l_EIO_Inhabited___boxed(obj*, obj*);
@ -1129,33 +1128,19 @@ lean::dec(x_1);
return x_2;
}
}
obj* l_IO_Fs_readFile___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; obj* x_6; obj* x_9;
x_3 = lean::cnstr_get(x_0, 0);
lean::inc(x_3);
lean::dec(x_0);
x_6 = lean::cnstr_get(x_3, 1);
lean::inc(x_6);
lean::dec(x_3);
x_9 = lean::apply_2(x_6, lean::box(0), x_1);
return x_9;
}
}
obj* l_IO_Fs_readFile___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
obj* l_IO_Fs_readFile___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) {
_start:
{
obj* x_5; obj* x_6; obj* x_7;
x_5 = l_IO_Fs_handle_close___rarg(x_0, x_1);
x_6 = lean::alloc_closure(reinterpret_cast<void*>(l_IO_Fs_readFile___rarg___lambda__1___boxed), 3, 2);
x_6 = lean::alloc_closure(reinterpret_cast<void*>(l_getModify___rarg___lambda__1___boxed), 3, 2);
lean::closure_set(x_6, 0, x_2);
lean::closure_set(x_6, 1, x_4);
x_7 = lean::apply_4(x_3, lean::box(0), lean::box(0), x_5, x_6);
return x_7;
}
}
obj* l_IO_Fs_readFile___rarg___lambda__3(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
obj* l_IO_Fs_readFile___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
obj* x_6; obj* x_8; obj* x_9;
@ -1163,7 +1148,7 @@ lean::inc(x_3);
lean::inc(x_0);
x_6 = l_IO_Fs_handle_readToEnd___rarg(x_0, x_3);
lean::inc(x_2);
x_8 = lean::alloc_closure(reinterpret_cast<void*>(l_IO_Fs_readFile___rarg___lambda__2), 5, 4);
x_8 = lean::alloc_closure(reinterpret_cast<void*>(l_IO_Fs_readFile___rarg___lambda__1), 5, 4);
lean::closure_set(x_8, 0, x_0);
lean::closure_set(x_8, 1, x_3);
lean::closure_set(x_8, 2, x_1);
@ -1182,7 +1167,7 @@ x_6 = 0;
lean::inc(x_1);
x_8 = l_IO_Fs_handle_mk___rarg(x_1, x_2, x_6, x_3);
lean::inc(x_4);
x_10 = lean::alloc_closure(reinterpret_cast<void*>(l_IO_Fs_readFile___rarg___lambda__3), 4, 3);
x_10 = lean::alloc_closure(reinterpret_cast<void*>(l_IO_Fs_readFile___rarg___lambda__2), 4, 3);
lean::closure_set(x_10, 0, x_1);
lean::closure_set(x_10, 1, x_0);
lean::closure_set(x_10, 2, x_4);
@ -1198,15 +1183,6 @@ x_1 = lean::alloc_closure(reinterpret_cast<void*>(l_IO_Fs_readFile___rarg___boxe
return x_1;
}
}
obj* l_IO_Fs_readFile___rarg___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = l_IO_Fs_readFile___rarg___lambda__1(x_0, x_1, x_2);
lean::dec(x_2);
return x_3;
}
}
obj* l_IO_Fs_readFile___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{

View file

@ -1,6 +1,6 @@
// Lean compiler output
// Module: init.lean.compiler.default
// Imports: init.lean.compiler.constfolding init.lean.compiler.ir init.lean.compiler.pushproj init.lean.compiler.elimdead init.lean.compiler.simpcase
// Imports: init.lean.compiler.constfolding init.lean.compiler.ir init.lean.compiler.pushproj init.lean.compiler.elimdead init.lean.compiler.simpcase init.lean.compiler.resetreuse
#include "runtime/object.h"
#include "runtime/apply.h"
typedef lean::object obj; typedef lean::usize usize;
@ -15,6 +15,7 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64;
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
obj* l_Lean_IR_test___closed__2;
obj* l_Lean_IR_test___closed__5;
namespace lean {
namespace ir {
obj* test_core(obj*, obj*);
@ -35,6 +36,7 @@ obj* l_Lean_IR_test___closed__1;
obj* l_Lean_IR_Decl_elimDead___main(obj*);
obj* l_Lean_IR_test___closed__4;
obj* l_IO_println___at_HasRepr_HasEval___spec__1(obj*, obj*);
obj* l_Lean_IR_Decl_insertResetReuse___main(obj*);
obj* l_IO_print___at_Lean_IR_test___spec__2(obj*, obj*);
obj* l_Lean_IR_Decl_simpCase___main(obj*);
extern obj* l_IO_println___rarg___closed__1;
@ -122,7 +124,7 @@ obj* _init_l_Lean_IR_test___closed__3() {
_start:
{
obj* x_0;
x_0 = lean::mk_string("=== After elim dead locals ===");
x_0 = lean::mk_string("=== After insert reset reuse ===");
return x_0;
}
}
@ -130,6 +132,14 @@ obj* _init_l_Lean_IR_test___closed__4() {
_start:
{
obj* x_0;
x_0 = lean::mk_string("=== After elim dead locals ===");
return x_0;
}
}
obj* _init_l_Lean_IR_test___closed__5() {
_start:
{
obj* x_0;
x_0 = lean::mk_string("=== After simplify case ===");
return x_0;
}
@ -233,7 +243,7 @@ if (lean::is_scalar(x_33)) {
}
lean::cnstr_set(x_34, 0, x_7);
lean::cnstr_set(x_34, 1, x_31);
x_35 = l_Lean_IR_Decl_elimDead___main(x_22);
x_35 = l_Lean_IR_Decl_insertResetReuse___main(x_22);
x_36 = l_Lean_IR_test___closed__3;
x_37 = l_IO_println___at_HasRepr_HasEval___spec__1(x_36, x_34);
if (lean::obj_tag(x_37) == 0)
@ -276,12 +286,12 @@ if (lean::is_scalar(x_46)) {
}
lean::cnstr_set(x_47, 0, x_7);
lean::cnstr_set(x_47, 1, x_44);
x_48 = l_Lean_IR_Decl_simpCase___main(x_35);
x_48 = l_Lean_IR_Decl_elimDead___main(x_35);
x_49 = l_Lean_IR_test___closed__4;
x_50 = l_IO_println___at_HasRepr_HasEval___spec__1(x_49, x_47);
if (lean::obj_tag(x_50) == 0)
{
obj* x_51; obj* x_53; obj* x_54; obj* x_55;
obj* x_51; obj* x_53; obj* x_54; obj* x_56;
x_51 = lean::cnstr_get(x_50, 1);
if (lean::is_exclusive(x_50)) {
lean::cnstr_release(x_50, 0);
@ -298,175 +308,308 @@ if (lean::is_scalar(x_53)) {
}
lean::cnstr_set(x_54, 0, x_7);
lean::cnstr_set(x_54, 1, x_51);
x_55 = l_IO_println___at_Lean_IR_test___spec__1(x_48, x_54);
return x_55;
}
else
lean::inc(x_48);
x_56 = l_IO_println___at_Lean_IR_test___spec__1(x_48, x_54);
if (lean::obj_tag(x_56) == 0)
{
obj* x_57; obj* x_59; obj* x_61; obj* x_62;
lean::dec(x_48);
x_57 = lean::cnstr_get(x_50, 0);
x_59 = lean::cnstr_get(x_50, 1);
if (lean::is_exclusive(x_50)) {
x_61 = x_50;
obj* x_57; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63;
x_57 = lean::cnstr_get(x_56, 1);
if (lean::is_exclusive(x_56)) {
lean::cnstr_release(x_56, 0);
x_59 = x_56;
} else {
lean::inc(x_57);
lean::inc(x_59);
lean::dec(x_50);
x_61 = lean::box(0);
lean::dec(x_56);
x_59 = lean::box(0);
}
if (lean::is_scalar(x_61)) {
x_62 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_59)) {
x_60 = lean::alloc_cnstr(0, 2, 0);
} else {
x_62 = x_61;
x_60 = x_59;
}
lean::cnstr_set(x_62, 0, x_57);
lean::cnstr_set(x_62, 1, x_59);
return x_62;
}
}
else
lean::cnstr_set(x_60, 0, x_7);
lean::cnstr_set(x_60, 1, x_57);
x_61 = l_Lean_IR_Decl_simpCase___main(x_48);
x_62 = l_Lean_IR_test___closed__5;
x_63 = l_IO_println___at_HasRepr_HasEval___spec__1(x_62, x_60);
if (lean::obj_tag(x_63) == 0)
{
obj* x_64; obj* x_66; obj* x_68; obj* x_69;
lean::dec(x_35);
x_64 = lean::cnstr_get(x_43, 0);
x_66 = lean::cnstr_get(x_43, 1);
if (lean::is_exclusive(x_43)) {
x_68 = x_43;
obj* x_64; obj* x_66; obj* x_67; obj* x_68;
x_64 = lean::cnstr_get(x_63, 1);
if (lean::is_exclusive(x_63)) {
lean::cnstr_release(x_63, 0);
x_66 = x_63;
} else {
lean::inc(x_64);
lean::inc(x_66);
lean::dec(x_43);
x_68 = lean::box(0);
lean::dec(x_63);
x_66 = lean::box(0);
}
if (lean::is_scalar(x_68)) {
x_69 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_66)) {
x_67 = lean::alloc_cnstr(0, 2, 0);
} else {
x_69 = x_68;
x_67 = x_66;
}
lean::cnstr_set(x_69, 0, x_64);
lean::cnstr_set(x_69, 1, x_66);
return x_69;
lean::cnstr_set(x_67, 0, x_7);
lean::cnstr_set(x_67, 1, x_64);
x_68 = l_IO_println___at_Lean_IR_test___spec__1(x_61, x_67);
if (lean::obj_tag(x_68) == 0)
{
obj* x_69; obj* x_71; obj* x_72;
x_69 = lean::cnstr_get(x_68, 1);
if (lean::is_exclusive(x_68)) {
lean::cnstr_release(x_68, 0);
x_71 = x_68;
} else {
lean::inc(x_69);
lean::dec(x_68);
x_71 = lean::box(0);
}
if (lean::is_scalar(x_71)) {
x_72 = lean::alloc_cnstr(0, 2, 0);
} else {
x_72 = x_71;
}
lean::cnstr_set(x_72, 0, x_7);
lean::cnstr_set(x_72, 1, x_69);
return x_72;
}
else
{
obj* x_71; obj* x_73; obj* x_75; obj* x_76;
lean::dec(x_35);
x_71 = lean::cnstr_get(x_37, 0);
x_73 = lean::cnstr_get(x_37, 1);
if (lean::is_exclusive(x_37)) {
x_75 = x_37;
obj* x_73; obj* x_75; obj* x_77; obj* x_78;
x_73 = lean::cnstr_get(x_68, 0);
x_75 = lean::cnstr_get(x_68, 1);
if (lean::is_exclusive(x_68)) {
x_77 = x_68;
} else {
lean::inc(x_71);
lean::inc(x_73);
lean::dec(x_37);
x_75 = lean::box(0);
lean::inc(x_75);
lean::dec(x_68);
x_77 = lean::box(0);
}
if (lean::is_scalar(x_75)) {
x_76 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_77)) {
x_78 = lean::alloc_cnstr(1, 2, 0);
} else {
x_76 = x_75;
x_78 = x_77;
}
lean::cnstr_set(x_76, 0, x_71);
lean::cnstr_set(x_76, 1, x_73);
return x_76;
lean::cnstr_set(x_78, 0, x_73);
lean::cnstr_set(x_78, 1, x_75);
return x_78;
}
}
else
{
obj* x_78; obj* x_80; obj* x_82; obj* x_83;
lean::dec(x_22);
x_78 = lean::cnstr_get(x_30, 0);
x_80 = lean::cnstr_get(x_30, 1);
if (lean::is_exclusive(x_30)) {
x_82 = x_30;
obj* x_80; obj* x_82; obj* x_84; obj* x_85;
lean::dec(x_61);
x_80 = lean::cnstr_get(x_63, 0);
x_82 = lean::cnstr_get(x_63, 1);
if (lean::is_exclusive(x_63)) {
x_84 = x_63;
} else {
lean::inc(x_78);
lean::inc(x_80);
lean::dec(x_30);
x_82 = lean::box(0);
lean::inc(x_82);
lean::dec(x_63);
x_84 = lean::box(0);
}
if (lean::is_scalar(x_82)) {
x_83 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_84)) {
x_85 = lean::alloc_cnstr(1, 2, 0);
} else {
x_83 = x_82;
x_85 = x_84;
}
lean::cnstr_set(x_83, 0, x_78);
lean::cnstr_set(x_83, 1, x_80);
return x_83;
lean::cnstr_set(x_85, 0, x_80);
lean::cnstr_set(x_85, 1, x_82);
return x_85;
}
}
else
{
obj* x_85; obj* x_87; obj* x_89; obj* x_90;
lean::dec(x_22);
x_85 = lean::cnstr_get(x_24, 0);
x_87 = lean::cnstr_get(x_24, 1);
if (lean::is_exclusive(x_24)) {
x_89 = x_24;
obj* x_87; obj* x_89; obj* x_91; obj* x_92;
lean::dec(x_48);
x_87 = lean::cnstr_get(x_56, 0);
x_89 = lean::cnstr_get(x_56, 1);
if (lean::is_exclusive(x_56)) {
x_91 = x_56;
} else {
lean::inc(x_85);
lean::inc(x_87);
lean::dec(x_24);
x_89 = lean::box(0);
lean::inc(x_89);
lean::dec(x_56);
x_91 = lean::box(0);
}
if (lean::is_scalar(x_89)) {
x_90 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_91)) {
x_92 = lean::alloc_cnstr(1, 2, 0);
} else {
x_90 = x_89;
x_92 = x_91;
}
lean::cnstr_set(x_90, 0, x_85);
lean::cnstr_set(x_90, 1, x_87);
return x_90;
lean::cnstr_set(x_92, 0, x_87);
lean::cnstr_set(x_92, 1, x_89);
return x_92;
}
}
else
{
obj* x_92; obj* x_94; obj* x_96; obj* x_97;
lean::dec(x_0);
x_92 = lean::cnstr_get(x_16, 0);
x_94 = lean::cnstr_get(x_16, 1);
if (lean::is_exclusive(x_16)) {
x_96 = x_16;
obj* x_94; obj* x_96; obj* x_98; obj* x_99;
lean::dec(x_48);
x_94 = lean::cnstr_get(x_50, 0);
x_96 = lean::cnstr_get(x_50, 1);
if (lean::is_exclusive(x_50)) {
x_98 = x_50;
} else {
lean::inc(x_92);
lean::inc(x_94);
lean::dec(x_16);
x_96 = lean::box(0);
lean::inc(x_96);
lean::dec(x_50);
x_98 = lean::box(0);
}
if (lean::is_scalar(x_96)) {
x_97 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_98)) {
x_99 = lean::alloc_cnstr(1, 2, 0);
} else {
x_97 = x_96;
x_99 = x_98;
}
lean::cnstr_set(x_97, 0, x_92);
lean::cnstr_set(x_97, 1, x_94);
return x_97;
lean::cnstr_set(x_99, 0, x_94);
lean::cnstr_set(x_99, 1, x_96);
return x_99;
}
}
else
{
obj* x_99; obj* x_101; obj* x_103; obj* x_104;
lean::dec(x_0);
x_99 = lean::cnstr_get(x_3, 0);
x_101 = lean::cnstr_get(x_3, 1);
if (lean::is_exclusive(x_3)) {
x_103 = x_3;
obj* x_101; obj* x_103; obj* x_105; obj* x_106;
lean::dec(x_35);
x_101 = lean::cnstr_get(x_43, 0);
x_103 = lean::cnstr_get(x_43, 1);
if (lean::is_exclusive(x_43)) {
x_105 = x_43;
} else {
lean::inc(x_99);
lean::inc(x_101);
lean::dec(x_3);
x_103 = lean::box(0);
lean::inc(x_103);
lean::dec(x_43);
x_105 = lean::box(0);
}
if (lean::is_scalar(x_103)) {
x_104 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_105)) {
x_106 = lean::alloc_cnstr(1, 2, 0);
} else {
x_104 = x_103;
x_106 = x_105;
}
lean::cnstr_set(x_104, 0, x_99);
lean::cnstr_set(x_104, 1, x_101);
return x_104;
lean::cnstr_set(x_106, 0, x_101);
lean::cnstr_set(x_106, 1, x_103);
return x_106;
}
}
else
{
obj* x_108; obj* x_110; obj* x_112; obj* x_113;
lean::dec(x_35);
x_108 = lean::cnstr_get(x_37, 0);
x_110 = lean::cnstr_get(x_37, 1);
if (lean::is_exclusive(x_37)) {
x_112 = x_37;
} else {
lean::inc(x_108);
lean::inc(x_110);
lean::dec(x_37);
x_112 = lean::box(0);
}
if (lean::is_scalar(x_112)) {
x_113 = lean::alloc_cnstr(1, 2, 0);
} else {
x_113 = x_112;
}
lean::cnstr_set(x_113, 0, x_108);
lean::cnstr_set(x_113, 1, x_110);
return x_113;
}
}
else
{
obj* x_115; obj* x_117; obj* x_119; obj* x_120;
lean::dec(x_22);
x_115 = lean::cnstr_get(x_30, 0);
x_117 = lean::cnstr_get(x_30, 1);
if (lean::is_exclusive(x_30)) {
x_119 = x_30;
} else {
lean::inc(x_115);
lean::inc(x_117);
lean::dec(x_30);
x_119 = lean::box(0);
}
if (lean::is_scalar(x_119)) {
x_120 = lean::alloc_cnstr(1, 2, 0);
} else {
x_120 = x_119;
}
lean::cnstr_set(x_120, 0, x_115);
lean::cnstr_set(x_120, 1, x_117);
return x_120;
}
}
else
{
obj* x_122; obj* x_124; obj* x_126; obj* x_127;
lean::dec(x_22);
x_122 = lean::cnstr_get(x_24, 0);
x_124 = lean::cnstr_get(x_24, 1);
if (lean::is_exclusive(x_24)) {
x_126 = x_24;
} else {
lean::inc(x_122);
lean::inc(x_124);
lean::dec(x_24);
x_126 = lean::box(0);
}
if (lean::is_scalar(x_126)) {
x_127 = lean::alloc_cnstr(1, 2, 0);
} else {
x_127 = x_126;
}
lean::cnstr_set(x_127, 0, x_122);
lean::cnstr_set(x_127, 1, x_124);
return x_127;
}
}
else
{
obj* x_129; obj* x_131; obj* x_133; obj* x_134;
lean::dec(x_0);
x_129 = lean::cnstr_get(x_16, 0);
x_131 = lean::cnstr_get(x_16, 1);
if (lean::is_exclusive(x_16)) {
x_133 = x_16;
} else {
lean::inc(x_129);
lean::inc(x_131);
lean::dec(x_16);
x_133 = lean::box(0);
}
if (lean::is_scalar(x_133)) {
x_134 = lean::alloc_cnstr(1, 2, 0);
} else {
x_134 = x_133;
}
lean::cnstr_set(x_134, 0, x_129);
lean::cnstr_set(x_134, 1, x_131);
return x_134;
}
}
else
{
obj* x_136; obj* x_138; obj* x_140; obj* x_141;
lean::dec(x_0);
x_136 = lean::cnstr_get(x_3, 0);
x_138 = lean::cnstr_get(x_3, 1);
if (lean::is_exclusive(x_3)) {
x_140 = x_3;
} else {
lean::inc(x_136);
lean::inc(x_138);
lean::dec(x_3);
x_140 = lean::box(0);
}
if (lean::is_scalar(x_140)) {
x_141 = lean::alloc_cnstr(1, 2, 0);
} else {
x_141 = x_140;
}
lean::cnstr_set(x_141, 0, x_136);
lean::cnstr_set(x_141, 1, x_138);
return x_141;
}
}
}
@ -476,6 +619,7 @@ obj* initialize_init_lean_compiler_ir(obj*);
obj* initialize_init_lean_compiler_pushproj(obj*);
obj* initialize_init_lean_compiler_elimdead(obj*);
obj* initialize_init_lean_compiler_simpcase(obj*);
obj* initialize_init_lean_compiler_resetreuse(obj*);
static bool _G_initialized = false;
obj* initialize_init_lean_compiler_default(obj* w) {
if (_G_initialized) return w;
@ -490,6 +634,8 @@ if (io_result_is_error(w)) return w;
w = initialize_init_lean_compiler_elimdead(w);
if (io_result_is_error(w)) return w;
w = initialize_init_lean_compiler_simpcase(w);
if (io_result_is_error(w)) return w;
w = initialize_init_lean_compiler_resetreuse(w);
if (io_result_is_error(w)) return w;
l_Lean_IR_test___closed__1 = _init_l_Lean_IR_test___closed__1();
lean::mark_persistent(l_Lean_IR_test___closed__1);
@ -499,5 +645,7 @@ lean::mark_persistent(l_Lean_IR_test___closed__2);
lean::mark_persistent(l_Lean_IR_test___closed__3);
l_Lean_IR_test___closed__4 = _init_l_Lean_IR_test___closed__4();
lean::mark_persistent(l_Lean_IR_test___closed__4);
l_Lean_IR_test___closed__5 = _init_l_Lean_IR_test___closed__5();
lean::mark_persistent(l_Lean_IR_test___closed__5);
return w;
}

View file

@ -1,6 +1,6 @@
// Lean compiler output
// Module: init.lean.compiler.elimdead
// Imports: init.default init.lean.compiler.ir
// Imports: init.lean.compiler.ir
#include "runtime/object.h"
#include "runtime/apply.h"
typedef lean::object obj; typedef lean::usize usize;
@ -63,45 +63,52 @@ uint8 x_3;
x_3 = l_Array_isEmpty___rarg(x_0);
if (x_3 == 0)
{
obj* x_4; obj* x_5;
obj* x_4; obj* x_5; obj* x_6; obj* x_8;
x_4 = l_Array_back___at_Lean_IR_reshapeWithoutDeadAux___main___spec__1(x_0);
x_5 = lean::array_pop(x_0);
switch (lean::obj_tag(x_4)) {
case 0:
{
obj* x_6; obj* x_9;
x_6 = lean::cnstr_get(x_4, 0);
lean::inc(x_6);
lean::inc(x_2);
x_9 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_2, x_6);
lean::dec(x_6);
if (lean::obj_tag(x_9) == 0)
{
lean::dec(x_4);
x_0 = x_5;
goto _start;
}
else
{
obj* x_15; obj* x_16;
lean::dec(x_9);
lean::inc(x_4);
x_15 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2);
x_16 = l_Lean_IR_FnBody_setBody___main(x_4, x_1);
x_0 = x_5;
x_1 = x_16;
x_2 = x_15;
goto _start;
}
obj* x_10;
x_10 = lean::cnstr_get(x_4, 0);
lean::inc(x_10);
x_8 = x_10;
goto lbl_9;
}
case 1:
{
obj* x_18; obj* x_21;
x_18 = lean::cnstr_get(x_4, 0);
lean::inc(x_18);
obj* x_12;
x_12 = lean::cnstr_get(x_4, 0);
lean::inc(x_12);
x_8 = x_12;
goto lbl_9;
}
default:
{
obj* x_14;
x_14 = lean::box(0);
x_6 = x_14;
goto lbl_7;
}
}
lbl_7:
{
obj* x_17; obj* x_18;
lean::dec(x_6);
lean::inc(x_4);
x_17 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2);
x_18 = l_Lean_IR_FnBody_setBody___main(x_4, x_1);
x_0 = x_5;
x_1 = x_18;
x_2 = x_17;
goto _start;
}
lbl_9:
{
obj* x_21;
lean::inc(x_2);
x_21 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_2, x_18);
lean::dec(x_18);
x_21 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_2, x_8);
lean::dec(x_8);
if (lean::obj_tag(x_21) == 0)
{
lean::dec(x_4);
@ -110,37 +117,11 @@ goto _start;
}
else
{
obj* x_27; obj* x_28;
obj* x_26;
lean::dec(x_21);
lean::inc(x_4);
x_27 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2);
x_28 = l_Lean_IR_FnBody_setBody___main(x_4, x_1);
x_0 = x_5;
x_1 = x_28;
x_2 = x_27;
goto _start;
}
}
case 12:
{
obj* x_30; obj* x_31;
x_30 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2);
x_31 = l_Lean_IR_FnBody_setBody___main(x_4, x_1);
x_0 = x_5;
x_1 = x_31;
x_2 = x_30;
goto _start;
}
default:
{
obj* x_34; obj* x_35;
lean::inc(x_4);
x_34 = l_Lean_IR_FnBody_collectFreeVars(x_4, x_2);
x_35 = l_Lean_IR_FnBody_setBody___main(x_4, x_1);
x_0 = x_5;
x_1 = x_35;
x_2 = x_34;
goto _start;
x_26 = lean::box(0);
x_6 = x_26;
goto lbl_7;
}
}
}
@ -436,15 +417,12 @@ x_1 = l_Lean_IR_Decl_elimDead___main(x_0);
return x_1;
}
}
obj* initialize_init_default(obj*);
obj* initialize_init_lean_compiler_ir(obj*);
static bool _G_initialized = false;
obj* initialize_init_lean_compiler_elimdead(obj* w) {
if (_G_initialized) return w;
_G_initialized = true;
if (io_result_is_error(w)) return w;
w = initialize_init_default(w);
if (io_result_is_error(w)) return w;
w = initialize_init_lean_compiler_ir(w);
if (io_result_is_error(w)) return w;
l_Array_hmmapAux___main___at_Lean_IR_FnBody_elimDead___main___spec__2___closed__1 = _init_l_Array_hmmapAux___main___at_Lean_IR_FnBody_elimDead___main___spec__2___closed__1();

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
// Lean compiler output
// Module: init.lean.compiler.pushproj
// Imports: init.default init.lean.compiler.ir
// Imports: init.lean.compiler.ir
#include "runtime/object.h"
#include "runtime/apply.h"
typedef lean::object obj; typedef lean::usize usize;
@ -312,140 +312,138 @@ uint8 x_5;
x_5 = l_Array_isEmpty___rarg(x_0);
if (x_5 == 0)
{
obj* x_6; obj* x_7;
obj* x_6; obj* x_7; obj* x_8; obj* x_10;
x_6 = l_Array_back___at_Lean_IR_pushProjs___main___spec__1(x_0);
x_7 = lean::array_pop(x_0);
switch (lean::obj_tag(x_6)) {
case 0:
{
obj* x_8;
x_8 = lean::cnstr_get(x_6, 1);
lean::inc(x_8);
switch (lean::obj_tag(x_8)) {
obj* x_12;
x_12 = lean::cnstr_get(x_6, 1);
lean::inc(x_12);
switch (lean::obj_tag(x_12)) {
case 3:
{
obj* x_11; obj* x_14;
lean::dec(x_8);
x_11 = lean::cnstr_get(x_6, 0);
lean::inc(x_11);
obj* x_15; obj* x_18;
lean::dec(x_12);
x_15 = lean::cnstr_get(x_6, 0);
lean::inc(x_15);
lean::inc(x_4);
x_14 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_4, x_11);
if (lean::obj_tag(x_14) == 0)
x_18 = l_RBNode_findCore___main___at___private_init_lean_compiler_ir_2__collectIndex___spec__1(x_4, x_15);
if (lean::obj_tag(x_18) == 0)
{
obj* x_15; obj* x_16; uint8 x_17;
x_15 = l_Lean_IR_pushProjs___main___closed__1;
x_16 = lean::mk_nat_obj(0ul);
x_17 = l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2(x_15, x_11, x_2, x_16);
if (x_17 == 0)
obj* x_19; obj* x_20; uint8 x_21;
x_19 = l_Lean_IR_pushProjs___main___closed__1;
x_20 = lean::mk_nat_obj(0ul);
x_21 = l_Array_anyAux___main___at_Lean_IR_pushProjs___main___spec__2(x_19, x_15, x_2, x_20);
if (x_21 == 0)
{
obj* x_20; obj* x_21;
lean::dec(x_11);
lean::inc(x_6);
x_20 = lean::array_push(x_3, x_6);
x_21 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4);
x_0 = x_7;
x_3 = x_20;
x_4 = x_21;
goto _start;
obj* x_23;
lean::dec(x_15);
x_23 = lean::box(0);
x_10 = x_23;
goto lbl_11;
}
else
{
obj* x_24; obj* x_25;
obj* x_25; obj* x_26;
lean::inc(x_6);
x_24 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(x_2, x_6, x_15, x_11, x_16, x_1);
x_25 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(x_6, x_15, x_11, x_16, x_2);
lean::dec(x_11);
x_25 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3(x_2, x_6, x_19, x_15, x_20, x_1);
x_26 = l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__4(x_6, x_19, x_15, x_20, x_2);
lean::dec(x_15);
x_0 = x_7;
x_1 = x_24;
x_2 = x_25;
x_1 = x_25;
x_2 = x_26;
goto _start;
}
}
else
{
obj* x_31; obj* x_32;
lean::dec(x_11);
lean::dec(x_14);
lean::inc(x_6);
x_31 = lean::array_push(x_3, x_6);
x_32 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4);
x_0 = x_7;
x_3 = x_31;
x_4 = x_32;
goto _start;
obj* x_31;
lean::dec(x_15);
lean::dec(x_18);
x_31 = lean::box(0);
x_10 = x_31;
goto lbl_11;
}
}
case 4:
{
obj* x_36; obj* x_37;
lean::dec(x_8);
lean::inc(x_6);
x_36 = lean::array_push(x_3, x_6);
x_37 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4);
x_0 = x_7;
x_3 = x_36;
x_4 = x_37;
goto _start;
obj* x_33;
lean::dec(x_12);
x_33 = lean::box(0);
x_10 = x_33;
goto lbl_11;
}
case 5:
{
obj* x_41; obj* x_42;
obj* x_35;
lean::dec(x_12);
x_35 = lean::box(0);
x_10 = x_35;
goto lbl_11;
}
default:
{
obj* x_39;
lean::dec(x_12);
lean::dec(x_4);
lean::dec(x_2);
x_39 = lean::box(0);
x_8 = x_39;
goto lbl_9;
}
}
}
default:
{
obj* x_42;
lean::dec(x_4);
lean::dec(x_2);
x_42 = lean::box(0);
x_8 = x_42;
goto lbl_9;
}
}
lbl_9:
{
obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_49;
lean::dec(x_8);
x_44 = lean::array_push(x_7, x_6);
x_45 = lean::mk_nat_obj(0ul);
x_46 = l_Array_reverseAux___main___rarg(x_3, x_45);
x_47 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_46, x_46, x_45, x_44);
lean::dec(x_46);
x_49 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_49, 0, x_47);
lean::cnstr_set(x_49, 1, x_1);
return x_49;
}
lbl_11:
{
obj* x_52; obj* x_53;
lean::dec(x_10);
lean::inc(x_6);
x_41 = lean::array_push(x_3, x_6);
x_42 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4);
x_52 = lean::array_push(x_3, x_6);
x_53 = l_Lean_IR_FnBody_collectFreeVars(x_6, x_4);
x_0 = x_7;
x_3 = x_41;
x_4 = x_42;
x_3 = x_52;
x_4 = x_53;
goto _start;
}
default:
{
obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_52;
lean::dec(x_4);
lean::dec(x_8);
lean::dec(x_2);
x_47 = lean::array_push(x_7, x_6);
x_48 = lean::mk_nat_obj(0ul);
x_49 = l_Array_reverseAux___main___rarg(x_3, x_48);
x_50 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_49, x_49, x_48, x_47);
lean::dec(x_49);
x_52 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_52, 0, x_50);
lean::cnstr_set(x_52, 1, x_1);
return x_52;
}
}
}
default:
{
obj* x_55; obj* x_56; obj* x_57; obj* x_58; obj* x_60;
lean::dec(x_4);
lean::dec(x_2);
x_55 = lean::array_push(x_7, x_6);
x_56 = lean::mk_nat_obj(0ul);
x_57 = l_Array_reverseAux___main___rarg(x_3, x_56);
x_58 = l_Array_miterateAux___main___at_Array_append___spec__1___rarg(x_57, x_57, x_56, x_55);
lean::dec(x_57);
x_60 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_60, 0, x_58);
lean::cnstr_set(x_60, 1, x_1);
return x_60;
}
}
}
else
{
obj* x_64; obj* x_65; obj* x_66;
obj* x_58; obj* x_59; obj* x_60;
lean::dec(x_4);
lean::dec(x_0);
lean::dec(x_2);
x_64 = lean::mk_nat_obj(0ul);
x_65 = l_Array_reverseAux___main___rarg(x_3, x_64);
x_66 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_66, 0, x_65);
lean::cnstr_set(x_66, 1, x_1);
return x_66;
x_58 = lean::mk_nat_obj(0ul);
x_59 = l_Array_reverseAux___main___rarg(x_3, x_58);
x_60 = lean::alloc_cnstr(0, 2, 0);
lean::cnstr_set(x_60, 0, x_59);
lean::cnstr_set(x_60, 1, x_1);
return x_60;
}
}
}
@ -834,15 +832,12 @@ x_1 = l_Lean_IR_Decl_pushProj___main(x_0);
return x_1;
}
}
obj* initialize_init_default(obj*);
obj* initialize_init_lean_compiler_ir(obj*);
static bool _G_initialized = false;
obj* initialize_init_lean_compiler_pushproj(obj* w) {
if (_G_initialized) return w;
_G_initialized = true;
if (io_result_is_error(w)) return w;
w = initialize_init_default(w);
if (io_result_is_error(w)) return w;
w = initialize_init_lean_compiler_ir(w);
if (io_result_is_error(w)) return w;
l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1 = _init_l_Array_hmmapAux___main___at_Lean_IR_pushProjs___main___spec__3___closed__1();

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
// Lean compiler output
// Module: init.lean.compiler.simpcase
// Imports: init.default init.lean.compiler.ir
// Imports: init.lean.compiler.ir
#include "runtime/object.h"
#include "runtime/apply.h"
typedef lean::object obj; typedef lean::usize usize;
@ -708,15 +708,12 @@ x_1 = l_Lean_IR_Decl_simpCase___main(x_0);
return x_1;
}
}
obj* initialize_init_default(obj*);
obj* initialize_init_lean_compiler_ir(obj*);
static bool _G_initialized = false;
obj* initialize_init_lean_compiler_simpcase(obj* w) {
if (_G_initialized) return w;
_G_initialized = true;
if (io_result_is_error(w)) return w;
w = initialize_init_default(w);
if (io_result_is_error(w)) return w;
w = initialize_init_lean_compiler_ir(w);
if (io_result_is_error(w)) return w;
l_Array_hmmapAux___main___at_Lean_IR_FnBody_simpCase___main___spec__2___closed__1 = _init_l_Array_hmmapAux___main___at_Lean_IR_FnBody_simpCase___main___spec__2___closed__1();