Skip to content

Commit 2bb894e

Browse files
committed
gesund
1 parent 022f18d commit 2bb894e

File tree

8 files changed

+17
-15
lines changed

8 files changed

+17
-15
lines changed

src/library/ir_interpreter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,9 @@ class interpreter {
10831083
} else { // IO _
10841084
lean_assert(params.size() == 1);
10851085
}
1086-
object* w = call_boxed("main", call_args.size(), &call_args[0]);
1086+
object * w = io_mk_world();
1087+
call_args.push_back(w);
1088+
w = call_boxed("main", call_args.size(), &call_args[0]);
10871089
if (io_result_is_ok(w)) {
10881090
int ret = 0;
10891091
lean::expr ret_ty = m_env.get("main").get_type();

tests/lake/examples/reverse-ffi/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extern uint64_t my_length(lean_obj_arg);
77
extern void lean_initialize_runtime_module();
88
extern void lean_initialize();
99
extern void lean_io_mark_end_initialization();
10-
extern lean_object * initialize_RFFI(uint8_t builtin, lean_object *);
10+
extern lean_object * initialize_RFFI(uint8_t builtin);
1111

1212
int main() {
1313
lean_initialize_runtime_module();

tests/lean/baseIO.lean.expected.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Compiler.saveBase] size: 9
2-
def test _y.1 : ST.Out lcAny UInt32 :=
2+
def test a.1 : ST.Out lcAny UInt32 :=
33
let _x.2 := 42;
4-
let _x.3 := @ST.Prim.mkRef _ _ _x.2 _y.1;
4+
let _x.3 := @ST.Prim.mkRef _ _ _x.2 a.1;
55
cases _x.3 : ST.Out lcAny UInt32
66
| ST.Out.mk val.4 state.5 =>
77
let _x.6 := 10;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[Compiler.saveMono] size: 7
2-
def foo b _y.1 : EST.Out IO.Error lcAny PUnit :=
2+
def foo b a.1 : EST.Out IO.Error lcAny PUnit :=
33
cases b : EST.Out IO.Error lcAny PUnit
44
| Bool.false =>
55
let _x.2 := 1;
6-
let _x.3 := print _x.2 _y.1;
6+
let _x.3 := print _x.2 a.1;
77
return _x.3
88
| Bool.true =>
99
let _x.4 := 0;
10-
let _x.5 := print _x.4 _y.1;
10+
let _x.5 := print _x.4 a.1;
1111
return _x.5

tests/lean/run/emptyLcnf.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ trace: [Compiler.result] size: 5
4141
let _x.3 := Array.push ◾ _x.2 _x.1;
4242
return _x.3
4343
[Compiler.result] size: 8
44-
def _eval a.1 a.2 _y.3 : EST.Out Lean.Exception lcAny PUnit :=
44+
def _eval a.1 a.2 a.3 : EST.Out Lean.Exception lcAny PUnit :=
4545
let _x.4 := _eval._closed_0;
4646
let _x.5 := _eval._closed_1;
4747
let _x.6 := 1;
4848
let _x.7 := _eval._closed_2;
4949
let _x.8 := _eval._closed_3;
5050
let _x.9 := PUnit.unit;
5151
let _f.10 := _eval._lam_0 _x.8 _x.9;
52-
let _x.11 := Lean.Elab.Command.liftTermElabM._redArg _f.10 a.1 a.2 _y.3;
52+
let _x.11 := Lean.Elab.Command.liftTermElabM._redArg _f.10 a.1 a.2 a.3;
5353
return _x.11
5454
-/
5555
#guard_msgs in

tests/lean/run/erased.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ trace: [Compiler.result] size: 5
6262
let _x.3 : Array Lean.Name := Array.push ◾ _x.2 _x.1;
6363
return _x.3
6464
[Compiler.result] size: 9
65-
def _eval (a.1 : Lean.Elab.Command.Context) (a.2 : lcAny) (_y.3 : lcVoid) : EST.Out Lean.Exception lcAny PUnit :=
65+
def _eval (a.1 : Lean.Elab.Command.Context) (a.2 : lcAny) (a.3 : lcVoid) : EST.Out Lean.Exception lcAny PUnit :=
6666
let _x.4 : String := _eval._closed_0;
6767
let _x.5 : String := _eval._closed_1;
6868
let _x.6 : Lean.Name := _eval._closed_2;
@@ -74,7 +74,7 @@ trace: [Compiler.result] size: 5
7474
lcAny →
7575
Lean.Meta.Context →
7676
lcAny → Lean.Core.Context → lcAny → lcVoid → EST.Out Lean.Exception lcAny PUnit := _eval._lam_0 _x.9 _x.10;
77-
let _x.12 : EST.Out Lean.Exception lcAny PUnit := Lean.Elab.Command.liftTermElabM._redArg _f.11 a.1 a.2 _y.3;
77+
let _x.12 : EST.Out Lean.Exception lcAny PUnit := Lean.Elab.Command.liftTermElabM._redArg _f.11 a.1 a.2 a.3;
7878
return _x.12
7979
-/
8080
#guard_msgs in

tests/lean/seqToCodeIssue.lean.expected.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Compiler.saveMono] size: 12
2-
def f b _y.1 : EST.Out IO.Error lcAny PUnit :=
2+
def f b a.1 : EST.Out IO.Error lcAny PUnit :=
33
jp _jp.2 a _y.3 : EST.Out IO.Error lcAny PUnit :=
44
let _x.4 := print a _y.3;
55
cases _x.4 : EST.Out IO.Error lcAny PUnit
@@ -11,7 +11,7 @@
1111
cases b : EST.Out IO.Error lcAny PUnit
1212
| Bool.false =>
1313
let _x.10 := 1;
14-
goto _jp.2 _x.10 _y.1
14+
goto _jp.2 _x.10 a.1
1515
| Bool.true =>
1616
let _x.11 := 0;
17-
goto _jp.2 _x.11 _y.1
17+
goto _jp.2 _x.11 a.1

tests/lean/unboxStruct.lean.expected.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Compiler.IR] [result]
22
def test2 (x_1 : u32) (x_2 : void) : obj :=
3-
let x_3 : obj := foo x_1 x_2;
3+
let x_3 : obj := foo x_1 ;
44
ret x_3
55
def test2._boxed (x_1 : tobj) (x_2 : tagged) : obj :=
66
let x_3 : u32 := unbox x_1;

0 commit comments

Comments
 (0)