File tree Expand file tree Collapse file tree 10 files changed +9703
-9506
lines changed
Expand file tree Collapse file tree 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 11[package ]
22name = " lambda_mountain"
3- version = " 1.11.81 "
3+ version = " 1.11.82 "
44authors = [" Andrew <andrew@subarctic.org>" ]
55license = " MIT"
66description = " Lambda Mountain"
Original file line number Diff line number Diff line change 11
22nostd : prod
3- ./production --nostd -o tmp.s tests/strict/ifeq .lm
3+ ./production --nostd -o tmp.s tests/strict/ifstreq .lm
44 as -o tmp.o tmp.s
55 ld -o tmp tmp.o
66 ./tmp && echo $?
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ stack-define-destructure := λ ctx lhs offset . (match lhs (
228228 (local return)
229229 (set return (expr::new()))
230230 (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 ) )))
232232 return
233233 )))
234234 ( 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
9797 \t 'movq \s (*( word-offset 8 )) \[ '%r14 \] , '%r15 \n
9898 \t 'movq \s '%r15 , \s (+( (.expression dst) (*( word-offset 8 )) )) \[ '%rbp \] \n
9999 ))
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+ ))
100112 ))
101113) Nil);
102114
Original file line number Diff line number Diff line change @@ -189,20 +189,16 @@ print := λ(: x I8). (: (tail(
189189 (gensym-label end-true)
190190 (gensym-label end-false)
191191 (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 ))
199197 (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)
206202 (label end-true)
207203 (mov( 1u64 RAX ))
208204 (jmp( end ))
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ main := (tail(
1414 (print x)(print y)(print \n_s)
1515 (if (==( x y )) (print 'Failure\n_s) (print 'ZeroNotEqualOne\n_s) )
1616 ))
17- ()
1817 (tail(
1918 (let x 0u16)
2019 (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