File tree 10 files changed +9703
-9506
lines changed
10 files changed +9703
-9506
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " lambda_mountain"
3
- version = " 1.11.81 "
3
+ version = " 1.11.82 "
4
4
authors = [" Andrew <andrew@subarctic.org>" ]
5
5
license = " MIT"
6
6
description = " Lambda Mountain"
Original file line number Diff line number Diff line change 1
1
2
2
nostd : prod
3
- ./production --nostd -o tmp.s tests/strict/ifeq .lm
3
+ ./production --nostd -o tmp.s tests/strict/ifstreq .lm
4
4
as -o tmp.o tmp.s
5
5
ld -o tmp tmp.o
6
6
./tmp && echo $?
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ stack-define-destructure := λ ctx lhs offset . (match lhs (
228
228
(local return)
229
229
(set return (expr::new()))
230
230
(set return (expr::set-context( return ctx )))
231
- (set return (expr::set-offset( return (i2s new_offset ) )))
231
+ (set return (expr::set-offset( return (expr::get-offset more-e ) )))
232
232
return
233
233
)))
234
234
( u (fail (UnknownStackArg lhs)))
Original file line number Diff line number Diff line change @@ -97,6 +97,18 @@ fragment mov := λ(: src Reg64)(: index Literal+Constant)(: dst LocalVariable+Si
97
97
\t 'movq \s (*( word-offset 8 )) \[ '%r14 \] , '%r15 \n
98
98
\t 'movq \s '%r15 , \s (+( (.expression dst) (*( word-offset 8 )) )) \[ '%rbp \] \n
99
99
))
100
+ (if-eq size 4 (
101
+ \t 'movq \s '0 \[ '%r14 \] , \s '%r15 \n
102
+ \t 'movq \s '%r15 , \s (.expression dst) \[ '%rbp \] \n
103
+ ))
104
+ (if-eq size 2 (
105
+ \t 'movq \s '0 \[ '%r14 \] , \s '%r15 \n
106
+ \t 'movq \s '%r15 , \s (.expression dst) \[ '%rbp \] \n
107
+ ))
108
+ (if-eq size 1 (
109
+ \t 'movq \s '0 \[ '%r14 \] , \s '%r15 \n
110
+ \t 'movq \s '%r15 , \s (.expression dst) \[ '%rbp \] \n
111
+ ))
100
112
))
101
113
) Nil);
102
114
Original file line number Diff line number Diff line change @@ -189,20 +189,16 @@ print := λ(: x I8). (: (tail(
189
189
(gensym-label end-true)
190
190
(gensym-label end-false)
191
191
(gensym-label end)
192
- # (mov( l R15 ))
193
- # (mov( r R14 ))
194
- # (label start )
195
- # (mov( R15 0u64 c1 ))
196
- # (mov( R14 0u64 c2 ))
197
- # (push R14)
198
- # (push R15)
192
+ (mov( l R8 ))
193
+ (mov( r R9 ))
194
+ (label start )
195
+ (mov( R8 0u64 c1 ))
196
+ (mov( R9 0u64 c2 ))
199
197
(if (==( c1 c2 )) () (jmp end-false))
200
- # (if (==( c1 0u8 )) () (jmp end-true))
201
- # (pop R15)
202
- # (pop R14)
203
- # (inc R14)
204
- # (inc R15)
205
- # (jmp start)
198
+ (if (==( c1 0u8 )) () (jmp end-true))
199
+ (inc R8)
200
+ (inc R9)
201
+ (jmp start)
206
202
(label end-true)
207
203
(mov( 1u64 RAX ))
208
204
(jmp( end ))
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ main := (tail(
14
14
(print x)(print y)(print \n_s)
15
15
(if (==( x y )) (print 'Failure\n_s) (print 'ZeroNotEqualOne\n_s) )
16
16
))
17
- ()
18
17
(tail(
19
18
(let x 0u16)
20
19
(let y 0u16)
Original file line number Diff line number Diff line change
1
+
2
+ import STDLIB/default-instruction-set.lm;
3
+ import STDLIB/default-primitives.lm;
4
+ import STDLIB/default-rules.lm;
5
+ import STDLIB/default-stdlib.lm;
6
+
7
+ main := (tail(
8
+ (let x 'a_s)
9
+ (let y 'a_s)
10
+ (print x)(print y)(print \n_s)
11
+ (if (==( x y )) (print 'AEqA\n_s) (print 'Failure\n_s) )
12
+ (set y 'b_s)
13
+ (print x)(print y)(print \n_s)
14
+ (if (==( x y )) (print 'Failure\n_s) (print 'ANotEqB\n_s) )
15
+ ));
Original file line number Diff line number Diff line change
1
+ aa
2
+ AEqA
3
+ ab
4
+ ANotEqB
Original file line number Diff line number Diff line change 1
- abcabcabc
1
+ abc
You can’t perform that action at this time.
0 commit comments