From 9e2200d0de830443194672b3ccd960886993dd62 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Mon, 9 Sep 2019 10:56:53 -0700 Subject: [PATCH] chore(stage0): update --- src/stage0/init/core.c | 8 ++ src/stage0/init/data/array/basic.c | 15 +++ src/stage0/init/data/bytearray/basic.c | 7 ++ src/stage0/init/data/hashable.c | 2 + src/stage0/init/data/int/basic.c | 19 ++++ src/stage0/init/data/nat/basic.c | 10 ++ src/stage0/init/data/nat/div.c | 4 + src/stage0/init/data/string/basic.c | 21 +++++ src/stage0/init/data/uint.c | 126 +++++++++++++++++++++++++ src/stage0/init/fix.c | 1 + src/stage0/init/lean/environment.c | 5 + src/stage0/init/lean/expr.c | 11 +++ src/stage0/init/lean/level.c | 1 + src/stage0/init/lean/name.c | 3 + src/stage0/init/lean/util.c | 2 + src/stage0/init/system/io.c | 18 ++++ src/stage0/init/util.c | 1 + 17 files changed, 254 insertions(+) diff --git a/src/stage0/init/core.c b/src/stage0/init/core.c index 5f956f0a4a..41f34438d4 100644 --- a/src/stage0/init/core.c +++ b/src/stage0/init/core.c @@ -528,6 +528,7 @@ _start: { lean_object* x_3; x_3 = lean_thunk_get_own(x_2); +lean_dec(x_2); return x_3; } } @@ -568,6 +569,7 @@ _start: { lean_object* x_3; x_3 = lean_task_get(x_2); +lean_dec(x_2); return x_3; } } @@ -714,6 +716,8 @@ _start: { lean_object* x_3; x_3 = lean_nat_add(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -1704,7 +1708,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 || x_4; x_6 = lean_box(x_5); return x_6; @@ -1715,7 +1721,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 && x_4; x_6 = lean_box(x_5); return x_6; diff --git a/src/stage0/init/data/array/basic.c b/src/stage0/init/data/array/basic.c index 2160286560..bb601c5a3a 100644 --- a/src/stage0/init/data/array/basic.c +++ b/src/stage0/init/data/array/basic.c @@ -402,6 +402,7 @@ _start: { lean_object* x_3; x_3 = lean_array_get_size(x_2); +lean_dec(x_2); return x_3; } } @@ -410,6 +411,7 @@ _start: { lean_object* x_3; x_3 = lean_mk_empty_array_with_capacity(x_2); +lean_dec(x_2); return x_3; } } @@ -513,6 +515,8 @@ _start: { lean_object* x_4; x_4 = lean_array_fget(x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); return x_4; } } @@ -521,7 +525,9 @@ _start: { size_t x_5; lean_object* x_6; x_5 = lean_unbox_usize(x_3); +lean_dec(x_3); x_6 = lean_array_uget(x_2, x_5); +lean_dec(x_2); return x_6; } } @@ -530,6 +536,8 @@ _start: { lean_object* x_5; x_5 = lean_array_get(x_2, x_3, x_4); +lean_dec(x_4); +lean_dec(x_3); return x_5; } } @@ -609,6 +617,7 @@ _start: { lean_object* x_5; x_5 = lean_array_fset(x_2, x_3, x_4); +lean_dec(x_3); return x_5; } } @@ -617,6 +626,7 @@ _start: { size_t x_6; lean_object* x_7; x_6 = lean_unbox_usize(x_3); +lean_dec(x_3); x_7 = lean_array_uset(x_2, x_6, x_4); return x_7; } @@ -626,6 +636,7 @@ _start: { lean_object* x_5; x_5 = lean_array_set(x_2, x_3, x_4); +lean_dec(x_3); return x_5; } } @@ -634,6 +645,8 @@ _start: { lean_object* x_5; x_5 = lean_array_fswap(x_2, x_3, x_4); +lean_dec(x_4); +lean_dec(x_3); return x_5; } } @@ -642,6 +655,8 @@ _start: { lean_object* x_5; x_5 = lean_array_swap(x_2, x_3, x_4); +lean_dec(x_4); +lean_dec(x_3); return x_5; } } diff --git a/src/stage0/init/data/bytearray/basic.c b/src/stage0/init/data/bytearray/basic.c index 20530a06f0..20549d5d51 100644 --- a/src/stage0/init/data/bytearray/basic.c +++ b/src/stage0/init/data/bytearray/basic.c @@ -79,6 +79,7 @@ _start: { lean_object* x_2; x_2 = lean_mk_empty_byte_array(x_1); +lean_dec(x_1); return x_2; } } @@ -112,6 +113,7 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_unbox(x_2); +lean_dec(x_2); x_4 = lean_byte_array_push(x_1, x_3); return x_4; } @@ -121,6 +123,7 @@ _start: { lean_object* x_2; x_2 = lean_byte_array_size(x_1); +lean_dec(x_1); return x_2; } } @@ -129,6 +132,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_byte_array_get(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -138,7 +143,9 @@ _start: { uint8_t x_4; lean_object* x_5; x_4 = lean_unbox(x_3); +lean_dec(x_3); x_5 = lean_byte_array_set(x_1, x_2, x_4); +lean_dec(x_2); return x_5; } } diff --git a/src/stage0/init/data/hashable.c b/src/stage0/init/data/hashable.c index a972931c31..5d901bb298 100644 --- a/src/stage0/init/data/hashable.c +++ b/src/stage0/init/data/hashable.c @@ -29,7 +29,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = lean_usize_mix_hash(x_3, x_4); x_6 = lean_box_usize(x_5); return x_6; diff --git a/src/stage0/init/data/int/basic.c b/src/stage0/init/data/int/basic.c index 240663ca97..b3e8a412a8 100644 --- a/src/stage0/init/data/int/basic.c +++ b/src/stage0/init/data/int/basic.c @@ -207,6 +207,7 @@ _start: { lean_object* x_2; x_2 = lean_int_neg(x_1); +lean_dec(x_1); return x_2; } } @@ -251,6 +252,8 @@ _start: { lean_object* x_3; x_3 = lean_int_add(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -259,6 +262,8 @@ _start: { lean_object* x_3; x_3 = lean_int_mul(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -315,6 +320,8 @@ _start: { lean_object* x_3; x_3 = lean_int_sub(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -355,6 +362,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_int_dec_eq(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -380,6 +389,7 @@ _start: { uint8_t x_2; lean_object* x_3; x_2 = lean_int_dec_nonneg(x_1); +lean_dec(x_1); x_3 = lean_box(x_2); return x_3; } @@ -389,6 +399,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_int_dec_le(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -398,6 +410,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_int_dec_lt(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -407,6 +421,7 @@ _start: { lean_object* x_2; x_2 = lean_nat_abs(x_1); +lean_dec(x_1); return x_2; } } @@ -486,6 +501,8 @@ _start: { lean_object* x_3; x_3 = lean_int_div(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -494,6 +511,8 @@ _start: { lean_object* x_3; x_3 = lean_int_mod(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } diff --git a/src/stage0/init/data/nat/basic.c b/src/stage0/init/data/nat/basic.c index f169e5c232..a19801d434 100644 --- a/src/stage0/init/data/nat/basic.c +++ b/src/stage0/init/data/nat/basic.c @@ -92,6 +92,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_nat_dec_eq(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -150,6 +152,8 @@ _start: { lean_object* x_3; x_3 = lean_nat_sub(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -158,6 +162,8 @@ _start: { lean_object* x_3; x_3 = lean_nat_mul(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -589,6 +595,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_nat_dec_le(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -598,6 +606,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_nat_dec_lt(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } diff --git a/src/stage0/init/data/nat/div.c b/src/stage0/init/data/nat/div.c index 9f69ea60df..0f5564d60b 100644 --- a/src/stage0/init/data/nat/div.c +++ b/src/stage0/init/data/nat/div.c @@ -82,6 +82,8 @@ _start: { lean_object* x_3; x_3 = lean_nat_div(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -149,6 +151,8 @@ _start: { lean_object* x_3; x_3 = lean_nat_mod(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } diff --git a/src/stage0/init/data/string/basic.c b/src/stage0/init/data/string/basic.c index 8cb83717af..54ea33bfac 100644 --- a/src/stage0/init/data/string/basic.c +++ b/src/stage0/init/data/string/basic.c @@ -336,6 +336,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_string_dec_eq(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -377,6 +379,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_string_dec_lt(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -386,6 +390,7 @@ _start: { lean_object* x_2; x_2 = lean_string_length(x_1); +lean_dec(x_1); return x_2; } } @@ -394,6 +399,7 @@ _start: { uint32_t x_3; lean_object* x_4; x_3 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_4 = lean_string_push(x_1, x_3); return x_4; } @@ -403,6 +409,7 @@ _start: { lean_object* x_3; x_3 = lean_string_append(x_1, x_2); +lean_dec(x_2); return x_3; } } @@ -473,6 +480,7 @@ _start: { lean_object* x_2; x_2 = lean_string_utf8_byte_size(x_1); +lean_dec(x_1); return x_2; } } @@ -583,6 +591,8 @@ _start: { uint32_t x_3; lean_object* x_4; x_3 = lean_string_utf8_get(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box_uint32(x_3); return x_4; } @@ -699,7 +709,9 @@ _start: { uint32_t x_4; lean_object* x_5; x_4 = lean_unbox_uint32(x_3); +lean_dec(x_3); x_5 = lean_string_utf8_set(x_1, x_2, x_4); +lean_dec(x_2); return x_5; } } @@ -708,6 +720,8 @@ _start: { lean_object* x_3; x_3 = lean_string_utf8_next(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -782,6 +796,8 @@ _start: { lean_object* x_3; x_3 = lean_string_utf8_prev(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); return x_3; } } @@ -831,6 +847,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_string_utf8_at_end(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -1196,6 +1214,9 @@ _start: { lean_object* x_4; x_4 = lean_string_utf8_extract(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); +lean_dec(x_1); return x_4; } } diff --git a/src/stage0/init/data/uint.c b/src/stage0/init/data/uint.c index c0b7894bbd..08b58bd86a 100644 --- a/src/stage0/init/data/uint.c +++ b/src/stage0/init/data/uint.c @@ -288,6 +288,7 @@ _start: { uint8_t x_2; lean_object* x_3; x_2 = lean_uint8_of_nat(x_1); +lean_dec(x_1); x_3 = lean_box(x_2); return x_3; } @@ -297,6 +298,7 @@ _start: { uint8_t x_2; lean_object* x_3; x_2 = lean_unbox(x_1); +lean_dec(x_1); x_3 = lean_uint8_to_nat(x_2); return x_3; } @@ -306,7 +308,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 + x_4; x_6 = lean_box(x_5); return x_6; @@ -317,7 +321,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 - x_4; x_6 = lean_box(x_5); return x_6; @@ -328,7 +334,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 * x_4; x_6 = lean_box(x_5); return x_6; @@ -339,7 +347,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 / x_4; x_6 = lean_box(x_5); return x_6; @@ -350,7 +360,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 % x_4; x_6 = lean_box(x_5); return x_6; @@ -361,7 +373,9 @@ _start: { uint8_t x_3; uint8_t x_4; lean_object* x_5; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_uint8_modn(x_3, x_2); +lean_dec(x_2); x_5 = lean_box(x_4); return x_5; } @@ -371,7 +385,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 & x_4; x_6 = lean_box(x_5); return x_6; @@ -382,7 +398,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 | x_4; x_6 = lean_box(x_5); return x_6; @@ -529,7 +547,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 == x_4; x_6 = lean_box(x_5); return x_6; @@ -540,7 +560,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 < x_4; x_6 = lean_box(x_5); return x_6; @@ -551,7 +573,9 @@ _start: { uint8_t x_3; uint8_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 <= x_4; x_6 = lean_box(x_5); return x_6; @@ -628,6 +652,7 @@ _start: { uint16_t x_2; lean_object* x_3; x_2 = lean_uint16_of_nat(x_1); +lean_dec(x_1); x_3 = lean_box(x_2); return x_3; } @@ -637,6 +662,7 @@ _start: { uint16_t x_2; lean_object* x_3; x_2 = lean_unbox(x_1); +lean_dec(x_1); x_3 = lean_uint16_to_nat(x_2); return x_3; } @@ -646,7 +672,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint16_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 + x_4; x_6 = lean_box(x_5); return x_6; @@ -657,7 +685,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint16_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 - x_4; x_6 = lean_box(x_5); return x_6; @@ -668,7 +698,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint16_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 * x_4; x_6 = lean_box(x_5); return x_6; @@ -679,7 +711,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint16_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 / x_4; x_6 = lean_box(x_5); return x_6; @@ -690,7 +724,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint16_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 % x_4; x_6 = lean_box(x_5); return x_6; @@ -701,7 +737,9 @@ _start: { uint16_t x_3; uint16_t x_4; lean_object* x_5; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_uint16_modn(x_3, x_2); +lean_dec(x_2); x_5 = lean_box(x_4); return x_5; } @@ -711,7 +749,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint16_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 & x_4; x_6 = lean_box(x_5); return x_6; @@ -722,7 +762,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint16_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 | x_4; x_6 = lean_box(x_5); return x_6; @@ -869,7 +911,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 == x_4; x_6 = lean_box(x_5); return x_6; @@ -880,7 +924,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 < x_4; x_6 = lean_box(x_5); return x_6; @@ -891,7 +937,9 @@ _start: { uint16_t x_3; uint16_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox(x_1); +lean_dec(x_1); x_4 = lean_unbox(x_2); +lean_dec(x_2); x_5 = x_3 <= x_4; x_6 = lean_box(x_5); return x_6; @@ -968,6 +1016,7 @@ _start: { uint32_t x_2; lean_object* x_3; x_2 = lean_uint32_of_nat(x_1); +lean_dec(x_1); x_3 = lean_box_uint32(x_2); return x_3; } @@ -977,6 +1026,7 @@ _start: { uint32_t x_2; lean_object* x_3; x_2 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_3 = lean_uint32_to_nat(x_2); return x_3; } @@ -986,7 +1036,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint32_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_3 + x_4; x_6 = lean_box_uint32(x_5); return x_6; @@ -997,7 +1049,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint32_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_3 - x_4; x_6 = lean_box_uint32(x_5); return x_6; @@ -1008,7 +1062,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint32_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_3 * x_4; x_6 = lean_box_uint32(x_5); return x_6; @@ -1019,7 +1075,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint32_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 / x_4; x_6 = lean_box_uint32(x_5); return x_6; @@ -1030,7 +1088,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint32_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 % x_4; x_6 = lean_box_uint32(x_5); return x_6; @@ -1041,7 +1101,9 @@ _start: { uint32_t x_3; uint32_t x_4; lean_object* x_5; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_uint32_modn(x_3, x_2); +lean_dec(x_2); x_5 = lean_box_uint32(x_4); return x_5; } @@ -1051,7 +1113,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint32_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_3 & x_4; x_6 = lean_box_uint32(x_5); return x_6; @@ -1062,7 +1126,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint32_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_3 | x_4; x_6 = lean_box_uint32(x_5); return x_6; @@ -1209,7 +1275,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_3 == x_4; x_6 = lean_box(x_5); return x_6; @@ -1220,7 +1288,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_3 < x_4; x_6 = lean_box(x_5); return x_6; @@ -1231,7 +1301,9 @@ _start: { uint32_t x_3; uint32_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = x_3 <= x_4; x_6 = lean_box(x_5); return x_6; @@ -1316,6 +1388,7 @@ _start: { uint64_t x_2; lean_object* x_3; x_2 = lean_uint64_of_nat(x_1); +lean_dec(x_1); x_3 = lean_box_uint64(x_2); return x_3; } @@ -1325,6 +1398,7 @@ _start: { uint64_t x_2; lean_object* x_3; x_2 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_3 = lean_uint64_to_nat(x_2); return x_3; } @@ -1334,7 +1408,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint64_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_3 + x_4; x_6 = lean_box_uint64(x_5); return x_6; @@ -1345,7 +1421,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint64_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_3 - x_4; x_6 = lean_box_uint64(x_5); return x_6; @@ -1356,7 +1434,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint64_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_3 * x_4; x_6 = lean_box_uint64(x_5); return x_6; @@ -1367,7 +1447,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint64_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 / x_4; x_6 = lean_box_uint64(x_5); return x_6; @@ -1378,7 +1460,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint64_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 % x_4; x_6 = lean_box_uint64(x_5); return x_6; @@ -1389,7 +1473,9 @@ _start: { uint64_t x_3; uint64_t x_4; lean_object* x_5; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_uint64_modn(x_3, x_2); +lean_dec(x_2); x_5 = lean_box_uint64(x_4); return x_5; } @@ -1399,7 +1485,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint64_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_3 & x_4; x_6 = lean_box_uint64(x_5); return x_6; @@ -1410,7 +1498,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint64_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_3 | x_4; x_6 = lean_box_uint64(x_5); return x_6; @@ -1557,7 +1647,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_3 == x_4; x_6 = lean_box(x_5); return x_6; @@ -1568,7 +1660,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_3 < x_4; x_6 = lean_box(x_5); return x_6; @@ -1579,7 +1673,9 @@ _start: { uint64_t x_3; uint64_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_4 = lean_unbox_uint64(x_2); +lean_dec(x_2); x_5 = x_3 <= x_4; x_6 = lean_box(x_5); return x_6; @@ -1666,6 +1762,7 @@ _start: { size_t x_2; lean_object* x_3; x_2 = lean_usize_of_nat(x_1); +lean_dec(x_1); x_3 = lean_box_usize(x_2); return x_3; } @@ -1675,6 +1772,7 @@ _start: { size_t x_2; lean_object* x_3; x_2 = lean_unbox_usize(x_1); +lean_dec(x_1); x_3 = lean_usize_to_nat(x_2); return x_3; } @@ -1684,7 +1782,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 + x_4; x_6 = lean_box_usize(x_5); return x_6; @@ -1695,7 +1795,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 - x_4; x_6 = lean_box_usize(x_5); return x_6; @@ -1706,7 +1808,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 * x_4; x_6 = lean_box_usize(x_5); return x_6; @@ -1717,7 +1821,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 / x_4; x_6 = lean_box_usize(x_5); return x_6; @@ -1728,7 +1834,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_4 == 0 ? 0 : x_3 % x_4; x_6 = lean_box_usize(x_5); return x_6; @@ -1739,7 +1847,9 @@ _start: { size_t x_3; size_t x_4; lean_object* x_5; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_usize_modn(x_3, x_2); +lean_dec(x_2); x_5 = lean_box_usize(x_4); return x_5; } @@ -1749,7 +1859,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 & x_4; x_6 = lean_box_usize(x_5); return x_6; @@ -1760,7 +1872,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 | x_4; x_6 = lean_box_usize(x_5); return x_6; @@ -1771,6 +1885,7 @@ _start: { uint32_t x_2; size_t x_3; lean_object* x_4; x_2 = lean_unbox_uint32(x_1); +lean_dec(x_1); x_3 = x_2; x_4 = lean_box_usize(x_3); return x_4; @@ -1781,6 +1896,7 @@ _start: { uint64_t x_2; size_t x_3; lean_object* x_4; x_2 = lean_unbox_uint64(x_1); +lean_dec(x_1); x_3 = ((size_t)x_2); x_4 = lean_box_usize(x_3); return x_4; @@ -1791,7 +1907,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 << x_4; x_6 = lean_box_usize(x_5); return x_6; @@ -1802,7 +1920,9 @@ _start: { size_t x_3; size_t x_4; size_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 >> x_4; x_6 = lean_box_usize(x_5); return x_6; @@ -1949,7 +2069,9 @@ _start: { size_t x_3; size_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 == x_4; x_6 = lean_box(x_5); return x_6; @@ -1960,7 +2082,9 @@ _start: { size_t x_3; size_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 < x_4; x_6 = lean_box(x_5); return x_6; @@ -1971,7 +2095,9 @@ _start: { size_t x_3; size_t x_4; uint8_t x_5; lean_object* x_6; x_3 = lean_unbox_usize(x_1); +lean_dec(x_1); x_4 = lean_unbox_usize(x_2); +lean_dec(x_2); x_5 = x_3 <= x_4; x_6 = lean_box(x_5); return x_6; diff --git a/src/stage0/init/fix.c b/src/stage0/init/fix.c index 10ad5bc75d..da9c0f471f 100644 --- a/src/stage0/init/fix.c +++ b/src/stage0/init/fix.c @@ -167,6 +167,7 @@ _start: { lean_object* x_6; x_6 = lean_fixpoint(x_4, x_5); +lean_dec(x_3); return x_6; } } diff --git a/src/stage0/init/lean/environment.c b/src/stage0/init/lean/environment.c index cc70df77df..5eb8af6892 100644 --- a/src/stage0/init/lean/environment.c +++ b/src/stage0/init/lean/environment.c @@ -4090,6 +4090,7 @@ _start: { lean_object* x_3; x_3 = lean_add_decl(x_1, x_2); +lean_dec(x_2); return x_3; } } @@ -4098,6 +4099,8 @@ _start: { lean_object* x_4; x_4 = lean_compile_decl(x_1, x_2, x_3); +lean_dec(x_3); +lean_dec(x_2); return x_4; } } @@ -12613,6 +12616,7 @@ _start: { lean_object* x_4; x_4 = lean_save_module_data(x_1, x_2, x_3); +lean_dec(x_1); return x_4; } } @@ -12621,6 +12625,7 @@ _start: { lean_object* x_3; x_3 = lean_read_module_data(x_1, x_2); +lean_dec(x_1); return x_3; } } diff --git a/src/stage0/init/lean/expr.c b/src/stage0/init/lean/expr.c index d9d3b64587..cb069d09bc 100644 --- a/src/stage0/init/lean/expr.c +++ b/src/stage0/init/lean/expr.c @@ -181,6 +181,7 @@ _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_2); +lean_dec(x_2); x_6 = lean_expr_mk_lambda(x_1, x_5, x_3, x_4); return x_6; } @@ -190,6 +191,7 @@ _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_2); +lean_dec(x_2); x_6 = lean_expr_mk_pi(x_1, x_5, x_3, x_4); return x_6; } @@ -231,6 +233,7 @@ _start: { uint8_t x_5; lean_object* x_6; x_5 = lean_unbox(x_4); +lean_dec(x_4); x_6 = lean_expr_local(x_1, x_2, x_3, x_5); return x_6; } @@ -280,6 +283,7 @@ _start: { size_t x_2; lean_object* x_3; x_2 = lean_expr_hash(x_1); +lean_dec(x_1); x_3 = lean_box_usize(x_2); return x_3; } @@ -305,6 +309,7 @@ _start: { lean_object* x_2; x_2 = lean_expr_dbg_to_string(x_1); +lean_dec(x_1); return x_2; } } @@ -313,6 +318,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_expr_quick_lt(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -322,6 +329,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_expr_lt(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } @@ -331,6 +340,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_expr_eqv(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } diff --git a/src/stage0/init/lean/level.c b/src/stage0/init/lean/level.c index 54ed16df33..f2ab3ae7f4 100644 --- a/src/stage0/init/lean/level.c +++ b/src/stage0/init/lean/level.c @@ -789,6 +789,7 @@ _start: { size_t x_2; lean_object* x_3; x_2 = lean_level_hash(x_1); +lean_dec(x_1); x_3 = lean_box_usize(x_2); return x_3; } diff --git a/src/stage0/init/lean/name.c b/src/stage0/init/lean/name.c index bedd88cb55..8b33c84e57 100644 --- a/src/stage0/init/lean/name.c +++ b/src/stage0/init/lean/name.c @@ -205,6 +205,7 @@ _start: { size_t x_2; lean_object* x_3; x_2 = lean_name_hash_usize(x_1); +lean_dec(x_1); x_3 = lean_box_usize(x_2); return x_3; } @@ -394,6 +395,8 @@ _start: { uint8_t x_3; lean_object* x_4; x_3 = lean_name_dec_eq(x_1, x_2); +lean_dec(x_2); +lean_dec(x_1); x_4 = lean_box(x_3); return x_4; } diff --git a/src/stage0/init/lean/util.c b/src/stage0/init/lean/util.c index ef35acae94..57fb917024 100644 --- a/src/stage0/init/lean/util.c +++ b/src/stage0/init/lean/util.c @@ -24,6 +24,8 @@ _start: { lean_object* x_6; x_6 = lean_lean_profileit(x_1, x_2, x_3, x_4, x_5); +lean_dec(x_3); +lean_dec(x_2); return x_6; } } diff --git a/src/stage0/init/system/io.c b/src/stage0/init/system/io.c index aa978cd63d..9f76c97187 100644 --- a/src/stage0/init/system/io.c +++ b/src/stage0/init/system/io.c @@ -397,6 +397,7 @@ _start: { lean_object* x_5; x_5 = lean_io_timeit(x_1, x_2, x_3, x_4); +lean_dec(x_2); return x_5; } } @@ -405,6 +406,7 @@ _start: { lean_object* x_5; x_5 = lean_io_allocprof(x_1, x_2, x_3, x_4); +lean_dec(x_2); return x_5; } } @@ -658,6 +660,7 @@ _start: { lean_object* x_3; x_3 = lean_io_prim_put_str(x_1, x_2); +lean_dec(x_1); return x_3; } } @@ -666,6 +669,7 @@ _start: { lean_object* x_3; x_3 = lean_io_prim_read_text_file(x_1, x_2); +lean_dec(x_1); return x_3; } } @@ -682,8 +686,11 @@ _start: { uint8_t x_5; uint8_t x_6; lean_object* x_7; x_5 = lean_unbox(x_2); +lean_dec(x_2); x_6 = lean_unbox(x_3); +lean_dec(x_3); x_7 = lean_io_prim_handle_mk(x_1, x_5, x_6, x_4); +lean_dec(x_1); return x_7; } } @@ -692,6 +699,7 @@ _start: { lean_object* x_3; x_3 = lean_io_prim_handle_is_eof(x_1, x_2); +lean_dec(x_1); return x_3; } } @@ -700,6 +708,7 @@ _start: { lean_object* x_3; x_3 = lean_io_prim_handle_flush(x_1, x_2); +lean_dec(x_1); return x_3; } } @@ -708,6 +717,7 @@ _start: { lean_object* x_3; x_3 = lean_io_prim_handle_close(x_1, x_2); +lean_dec(x_1); return x_3; } } @@ -716,6 +726,7 @@ _start: { lean_object* x_3; x_3 = lean_io_prim_handle_get_line(x_1, x_2); +lean_dec(x_1); return x_3; } } @@ -724,6 +735,7 @@ _start: { lean_object* x_3; x_3 = lean_io_getenv(x_1, x_2); +lean_dec(x_1); return x_3; } } @@ -740,6 +752,7 @@ _start: { lean_object* x_3; x_3 = lean_io_is_dir(x_1, x_2); +lean_dec(x_1); return x_3; } } @@ -748,6 +761,7 @@ _start: { lean_object* x_3; x_3 = lean_io_file_exists(x_1, x_2); +lean_dec(x_1); return x_3; } } @@ -1645,6 +1659,7 @@ _start: { lean_object* x_4; x_4 = lean_io_ref_get(x_2, x_3); +lean_dec(x_2); return x_4; } } @@ -1653,6 +1668,7 @@ _start: { lean_object* x_5; x_5 = lean_io_ref_set(x_2, x_3, x_4); +lean_dec(x_2); return x_5; } } @@ -1661,6 +1677,7 @@ _start: { lean_object* x_5; x_5 = lean_io_ref_swap(x_2, x_3, x_4); +lean_dec(x_2); return x_5; } } @@ -1669,6 +1686,7 @@ _start: { lean_object* x_4; x_4 = lean_io_ref_reset(x_2, x_3); +lean_dec(x_2); return x_4; } } diff --git a/src/stage0/init/util.c b/src/stage0/init/util.c index 9ce7c20fc1..666de35118 100644 --- a/src/stage0/init/util.c +++ b/src/stage0/init/util.c @@ -42,6 +42,7 @@ _start: { uint32_t x_4; lean_object* x_5; x_4 = lean_unbox_uint32(x_2); +lean_dec(x_2); x_5 = lean_dbg_sleep(x_4, x_3); return x_5; }