Skip to content

Commit 30c2a09

Browse files
need a new calling convention to return types outside of registers
1 parent 528dd38 commit 30c2a09

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

PRODUCTION/typecheck.lm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,7 @@ typecheck-as-return := λrt . (tail(
938938
(2 (And( Reg16 rt )))
939939
(4 (And( Reg32 rt )))
940940
(8 (And( Reg64 rt )))
941+
(_ (And( LocalVariable rt )))
941942
))
942943
));
943944

STDLIB/default-stdlib.lm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ close := λ(: x S). (: (tail(
1010
(as R8 S[])
1111
)) S[]);
1212

13+
open := λ(: x S[]). (: (tail(
14+
()
15+
SNil
16+
)) S);
17+
1318
print := λ(: x S). (: (tail(
1419
(if (==( (.0 x) 3u64 )) (
1520
(print '\[\]_s)
@@ -19,9 +24,9 @@ print := λ(: x S). (: (tail(
1924
) (
2025
(if (==( (.0 x) 1u64 )) (tail(
2126
(print '\[_s)
22-
(print (as (.1 (as x SCons)) U64))
27+
(print (open (.1 (as x SCons))))
2328
(print '\s_s)
24-
(print (as (.2 (as x SCons)) U64))
29+
(print (open (.2 (as x SCons))))
2530
(print '\]_s)
2631
)) (tail(
2732
(print '[_s)

0 commit comments

Comments
 (0)