File tree 9 files changed +64
-47
lines changed
9 files changed +64
-47
lines changed Original file line number Diff line number Diff line change @@ -59427,32 +59427,16 @@ uuid_0000000000000355:
59427
59427
call __s2i_C___
59428
59428
mov %r12, -184(%rbp)
59429
59429
mov %r13, -192(%rbp)
59430
+ mov -184(%rbp),%r12
59431
+ mov -192(%rbp),%r13
59432
+ call inv
59433
+ mov %r12, -168(%rbp)
59434
+ mov %r13, -176(%rbp)
59430
59435
uuid_0000000000000356:
59431
59436
mov -184(%rbp),%r12
59432
59437
mov -192(%rbp),%r13
59433
59438
cmp $0, %r12
59434
59439
je uuid_0000000000000357
59435
- mov $uuid_0000000000000316, %r12
59436
- mov $0, %r13
59437
- call __s2i_C___
59438
- push %r12
59439
- push %r13
59440
- mov -168(%rbp),%r12
59441
- mov -176(%rbp),%r13
59442
- call uuid_0000000000000003
59443
- mov %r12, 0(%r8)
59444
- mov %r13, 8(%r8)
59445
- pop %r13
59446
- pop %r12
59447
- push %r8
59448
- call uuid_0000000000000003
59449
- mov %r12, 0(%r8)
59450
- mov %r13, 8(%r8)
59451
- mov %r8, %r12
59452
- pop %r13
59453
- call add
59454
- mov %r12, -168(%rbp)
59455
- mov %r13, -176(%rbp)
59456
59440
mov -136(%rbp),%r12
59457
59441
mov -144(%rbp),%r13
59458
59442
push %r12
@@ -59794,6 +59778,27 @@ uuid_0000000000000356:
59794
59778
call __s2i_C___
59795
59779
push %r12
59796
59780
push %r13
59781
+ mov -168(%rbp),%r12
59782
+ mov -176(%rbp),%r13
59783
+ call uuid_0000000000000003
59784
+ mov %r12, 0(%r8)
59785
+ mov %r13, 8(%r8)
59786
+ pop %r13
59787
+ pop %r12
59788
+ push %r8
59789
+ call uuid_0000000000000003
59790
+ mov %r12, 0(%r8)
59791
+ mov %r13, 8(%r8)
59792
+ mov %r8, %r12
59793
+ pop %r13
59794
+ call add
59795
+ mov %r12, -168(%rbp)
59796
+ mov %r13, -176(%rbp)
59797
+ mov $uuid_000000000000001f, %r12
59798
+ mov $0, %r13
59799
+ call __s2i_C___
59800
+ push %r12
59801
+ push %r13
59797
59802
mov -152(%rbp),%r12
59798
59803
mov -160(%rbp),%r13
59799
59804
call uuid_0000000000000003
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " lambda_mountain"
3
- version = " 1.11.70 "
3
+ version = " 1.11.71 "
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/cc1 .lm
3
+ ./production --nostd -o tmp.s tests/strict/cc2 .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 @@ -45,13 +45,14 @@ stack-call := λ ctx function-name function-args offset . (tail(
45
45
)))
46
46
( copy-size (tail(
47
47
(set copy-size (s2i copy-size))
48
+ (set copy-offset (inv( copy-size )))
48
49
(while copy-size (
49
- (set copy-offset (add( (s2i '-8) copy-offset )))
50
50
(set copy-bytes ( copy-bytes
51
51
\t 'mov \s (i2s( src-offset )) \[ '%rbp \] , \s '%rax \n
52
52
\t 'mov \s '%rax , \s (i2s( copy-offset )) \[ '%rbp \] \n
53
53
))
54
- (set src-offset (add( (s2i 8) src-offset )))
54
+ (set copy-offset (add( (s2i '8) copy-offset )))
55
+ (set src-offset (add( (s2i '8) src-offset )))
55
56
(set copy-size (add( (s2i '-8) copy-size )))
56
57
))
57
58
)))
Original file line number Diff line number Diff line change @@ -31,10 +31,7 @@ fragment mov := λ(: src LocalVariable+Sized<size>)(: dst LocalVariable+Sized<si
31
31
\t 'movq \s (+( (.expression src) (*( word-offset 8 )) )) \[ '%rbp \] , \s '%r15 \n
32
32
\t 'movq \s '%r15 , \s (+(
33
33
(.expression dst)
34
- (+(
35
- (+( size -8 ))
36
- (inv( (*( word-offset 8 )) ))
37
- ))
34
+ (*( word-offset 8 ))
38
35
)) \[ '%rbp \] \n
39
36
)))
40
37
) Nil);
Original file line number Diff line number Diff line change @@ -18,16 +18,17 @@ print := λ(: x S). (: (tail(
18
18
(print (.1 (as x SAtom)))
19
19
) (
20
20
(if (==( (.0 x) 1u64 )) (tail(
21
- (let c SNil)
21
+ # (let c SNil)
22
22
(print '\[_s)
23
- (print( (as (.1 (as x SCons)) U64) ))
24
- (mov( (.1 (as x SCons)) 0u64 c ))
25
- (print c)
23
+ # (print( (as (.1 (as x SCons)) U64) ))
24
+ # (mov( (.1 (as x SCons)) 0u64 c ))
25
+ # (print c)
26
26
(print '\s_s)
27
- (print( (as (.2 (as x SCons)) U64) ))
28
- (mov( (.2 (as x SCons)) 0u64 c ))
29
- (print c)
27
+ # (print( (as (.2 (as x SCons)) U64) ))
28
+ # (mov( (.2 (as x SCons)) 0u64 c ))
29
+ # (print c)
30
30
(print '\]_s)
31
+ ()
31
32
)) (tail(
32
33
(print '[_s)
33
34
(print (as (.1 (as x SPointer)) U64))
Original file line number Diff line number Diff line change @@ -14,17 +14,12 @@ config-mode := Compile;
14
14
main := λ(: argc U64)(: argv U8[][]).(tail(
15
15
# (let argi 0u64)
16
16
(let input_l (SAtom( 'an-atom_s )))
17
- (let input_o SNil)
18
- (let close_l 0u64)
19
- (push (close( input_l )))
20
- (pop( close_l ))
21
- (mov( close_l R8 ))
22
- (mov( (as R8 S[]) 0u64 input_o ))
23
- (print input_o)
24
- # (push (close( input_r )))
25
- # (pop( close_r ))
26
- # (let input (SCons( (as close_l S[]) (as close_r S[]) )))
27
- # (print input)
17
+ (let input_r (SPointer( 'test_s )))
18
+ (let input (SCons(
19
+ (close input_l)
20
+ (close input_r)
21
+ )))
22
+ (print input)
28
23
# (while (<( argi argc )) (
29
24
# (if (==( ([]( argv argi )) '--tokenize_s )) (
30
25
# (print '--tokenize_s)
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
+ echo := λ(: x U64). (: (
8
+ x
9
+ ) U64);
10
+
11
+ main := (
12
+ (let x SNil)
13
+ # (let x (SCons(
14
+ # (close(SAtom( 'an-atom_s )))
15
+ # (close(SNil))
16
+ # )))
17
+ (print x)
18
+ );
You can’t perform that action at this time.
0 commit comments