Skip to content

Commit f535ea4

Browse files
uuids are problematic
1 parent 84c8c79 commit f535ea4

File tree

5 files changed

+51
-41
lines changed

5 files changed

+51
-41
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
nostd: prod
3-
./production --nostd -o tmp.s tests/strict/match6.lm
3+
./production --nostd -o tmp.s STRICT/cli.lm
44
as -o tmp.o tmp.s
55
ld -o tmp tmp.o
66
./tmp && echo $?

STDLIB/default-rules.lm

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,47 +32,47 @@ macro ('match-pats-condition( term (:Tag: l lt) )) (
3232
);
3333

3434
macro ('match-pats-condition( term ((:Tag: l lt) ( x1 )) )) (tail(
35-
(let ok Trueu8)
36-
(if (==( (.0( term )) l )) () (set ok Falseu8))
37-
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set ok Falseu8))
38-
(==( ok Trueu8 ))
35+
(let (uuid ok) Trueu8)
36+
(if (==( (.0( term )) l )) () (set (uuid ok) Falseu8))
37+
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set (uuid ok) Falseu8))
38+
(==( (uuid ok) Trueu8 ))
3939
));
4040

4141
macro ('match-pats-condition( term ((:Tag: l lt) ( x2 x1 ) ))) (tail(
42-
(let ok Trueu8)
43-
(if (==( (.0( term )) l )) () (set ok Falseu8))
44-
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set ok Falseu8))
45-
(if (match-pats-condition( (.2( (as term lt) )) x2 )) () (set ok Falseu8))
46-
(==( ok Trueu8 ))
42+
(let (uuid ok) Trueu8)
43+
(if (==( (.0( term )) l )) () (set (uuid ok) Falseu8))
44+
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set (uuid ok) Falseu8))
45+
(if (match-pats-condition( (.2( (as term lt) )) x2 )) () (set (uuid ok) Falseu8))
46+
(==( (uuid ok) Trueu8 ))
4747
));
4848

4949
macro ('match-pats-condition( term ((:Tag: l lt) ( x3 x2 x1 ) ))) (tail(
50-
(let ok Trueu8)
51-
(if (==( (.0( term )) l )) () (set ok Falseu8))
52-
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set ok Falseu8))
53-
(if (match-pats-condition( (.2( (as term lt) )) x2 )) () (set ok Falseu8))
54-
(if (match-pats-condition( (.3( (as term lt) )) x3 )) () (set ok Falseu8))
55-
(==( ok Trueu8 ))
50+
(let (uuid ok) Trueu8)
51+
(if (==( (.0( term )) l )) () (set (uuid ok) Falseu8))
52+
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set (uuid ok) Falseu8))
53+
(if (match-pats-condition( (.2( (as term lt) )) x2 )) () (set (uuid ok) Falseu8))
54+
(if (match-pats-condition( (.3( (as term lt) )) x3 )) () (set (uuid ok) Falseu8))
55+
(==( (uuid ok) Trueu8 ))
5656
));
5757

5858
macro ('match-pats-condition( term ((:Tag: l lt) ( x4 x3 x2 x1 ) ))) (tail(
59-
(let ok Trueu8)
60-
(if (==( (.0( term )) l )) () (set ok Falseu8))
61-
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set ok Falseu8))
62-
(if (match-pats-condition( (.2( (as term lt) )) x2 )) () (set ok Falseu8))
63-
(if (match-pats-condition( (.3( (as term lt) )) x3 )) () (set ok Falseu8))
64-
(if (match-pats-condition( (.4( (as term lt) )) x4 )) () (set ok Falseu8))
65-
(==( ok Trueu8 ))
59+
(let (uuid ok) Trueu8)
60+
(if (==( (.0( term )) l )) () (set (uuid ok) Falseu8))
61+
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set (uuid ok) Falseu8))
62+
(if (match-pats-condition( (.2( (as term lt) )) x2 )) () (set (uuid ok) Falseu8))
63+
(if (match-pats-condition( (.3( (as term lt) )) x3 )) () (set (uuid ok) Falseu8))
64+
(if (match-pats-condition( (.4( (as term lt) )) x4 )) () (set (uuid ok) Falseu8))
65+
(==( (uuid ok) Trueu8 ))
6666
));
6767

6868
macro ('match-pats-condition( term ((:Tag: l lt) ( x5 x4 x3 x2 x1 ) ))) (tail(
69-
(let ok Trueu8)
70-
(if (==( (.0( term )) l )) () (set ok Falseu8))
71-
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set ok Falseu8))
72-
(if (match-pats-condition( (.2( (as term lt) )) x2 )) () (set ok Falseu8))
73-
(if (match-pats-condition( (.3( (as term lt) )) x3 )) () (set ok Falseu8))
74-
(if (match-pats-condition( (.4( (as term lt) )) x4 )) () (set ok Falseu8))
75-
(if (match-pats-condition( (.5( (as term lt) )) x5 )) () (set ok Falseu8))
76-
(==( ok Trueu8 ))
69+
(let (uuid ok) Trueu8)
70+
(if (==( (.0( term )) l )) () (set (uuid ok) Falseu8))
71+
(if (match-pats-condition( (.1( (as term lt) )) x1 )) () (set (uuid ok) Falseu8))
72+
(if (match-pats-condition( (.2( (as term lt) )) x2 )) () (set (uuid ok) Falseu8))
73+
(if (match-pats-condition( (.3( (as term lt) )) x3 )) () (set (uuid ok) Falseu8))
74+
(if (match-pats-condition( (.4( (as term lt) )) x4 )) () (set (uuid ok) Falseu8))
75+
(if (match-pats-condition( (.5( (as term lt) )) x5 )) () (set (uuid ok) Falseu8))
76+
(==( (uuid ok) Trueu8 ))
7777
));
7878

STRICT/cli.lm

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,19 @@ main := λ(: argc U64)(: argv U8[][]).(tail(
2727
('--gradual_s (set config-strict Falseu8))
2828
('--macro_s (set config-preprocess Trueu8))
2929
('--nomacro_s (set config-preprocess Falseu8))
30-
('-o_s (tail(
31-
(set argi (+( argi 1u64 )))
32-
(set input (SCons(
33-
(close input)
34-
(close (SAtom([]( argv argi ))))
35-
)))
36-
)))
37-
(fp (tail(
38-
(print fp)
30+
# ('-o_s (tail(
31+
# (set argi (+( argi 1u64 )))
32+
# (set input (SCons(
33+
# (close input)
34+
# (close (SAtom([]( argv argi ))))
35+
# )))
36+
# )))
37+
(fp (
3938
(set input (SCons(
4039
(close input)
4140
(close (SAtom( fp )))
4241
)))
43-
)))
42+
))
4443
))
4544
(set argi (+( argi 1u64 )))
4645
))

tests/strict/match7.lm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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 := (match '--nomacro_s (
8+
()
9+
('--nomacro_s (tail( () (print 'Ok_s) )))
10+
));

tests/strict/match7.lm.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ok

0 commit comments

Comments
 (0)