Skip to content

Commit 528dd38

Browse files
close seems to work
1 parent 253b5b7 commit 528dd38

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lambda_mountain"
3-
version = "1.11.67"
3+
version = "1.11.68"
44
authors = ["Andrew <andrew@subarctic.org>"]
55
license = "MIT"
66
description = "Lambda Mountain"

STDLIB/default-instruction-set.lm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ fragment pop := λ(: src LocalVariable+Sized<size>). (: (
5858
)))
5959
) Nil);
6060

61-
fragment mov := λ(: src LocalVariable+Sized<size>)(: index Literal+Constant)(: dst LocalVariable+x[]). (: (
61+
fragment mov := λ(: src LocalVariable+Sized<size>)(: index Literal+Constant)(: dst Reg64+x[]). (: (
6262
(.program (
63-
(\t 'mov \s (.expression dst) \[ '%rbp \] , \s '%r14 \n)
63+
(\t 'mov \s '% (.expression dst) , \s '%r14 \n)
6464
(for word-offset in (range( 0 (/( size 8 )) )) (
6565
\t 'movq \s (+( (.expression src) (*( word-offset 8 )) )) \[ '%rbp \] , \s '%r15 \n
6666
\t 'movq \s '%r15 , \s (*( word-offset 8 )) \[ '%r14 \] \n

STDLIB/default-stdlib.lm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ type S (SNil)
55
| (SPointer( ?[] ));
66

77
close := λ(: x S). (: (tail(
8-
(mov( (malloc(sizeof S)) R15 ))
9-
(as R15 S[])
8+
(mov( (malloc(sizeof S)) R8 ))
9+
(mov( x 0u64 (as R8 S[]) ))
10+
(as R8 S[])
1011
)) S[]);
1112

1213
print := λ(: x S). (: (tail(

0 commit comments

Comments
 (0)