File tree 3 files changed +15
-17
lines changed
3 files changed +15
-17
lines changed Original file line number Diff line number Diff line change 1
1
2
2
nostd : prod
3
- ./production --nostd -o tmp.s tests/strict/match2 .lm
3
+ ./production --nostd -o tmp.s tests/strict/match6 .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 @@ -163,7 +163,7 @@ compile-expr-strict := λctx e offset used . (tail(
163
163
( (App( (App( (App( (Variable 'if) cond )) t )) f )) (tail(
164
164
(set e1 (compile-expr-strict( ctx cond offset Used )))
165
165
(set e2 (compile-expr-strict( (expr::get-context e1) t (expr::get-offset e1) Used )))
166
- (set e3 (compile-expr-strict( (expr::get-context e2 ) f (expr::get-offset e2 ) Used )))
166
+ (set e3 (compile-expr-strict( (expr::get-context e1 ) f (expr::get-offset e1 ) Used )))
167
167
(match (expr::get-type e1) (
168
168
()
169
169
(BranchConditional ())
@@ -185,22 +185,19 @@ compile-expr-strict := λctx e offset used . (tail(
185
185
(set e4 (expr::set-prog( e4 (
186
186
(expr::get-prog e1)
187
187
\t (expr::get-expr e1) \s label-true-branch \n
188
- (expr::get-altframe e2)
188
+ (expr::get-frame e3)
189
+ (expr::get-altframe e1)
189
190
(expr::get-prog e3)
191
+ (expr::get-unframe e3)
190
192
\t 'jmp \s label-end \n
191
193
label-true-branch ': \n
194
+ (expr::get-frame e2)
192
195
(expr::get-prog e2)
193
- (expr::get-altframe e3 )
196
+ (expr::get-unframe e2 )
194
197
label-end ': \n
195
198
))))
196
199
(set e4 (expr::set-context( e4 (expr::get-context e3) )))
197
- (set e4 (expr::set-offset( e4 (expr::get-offset e3) )))
198
- (set e4 (expr::set-frame( e4 (
199
- (expr::get-frame e1) (expr::get-frame e2) (expr::get-frame e3)
200
- ))))
201
- (set e4 (expr::set-unframe( e4 (
202
- (expr::get-unframe e1) (expr::get-unframe e2) (expr::get-unframe e3)
203
- ))))
200
+ (set e4 (expr::set-offset( e4 (expr::get-offset e1) )))
204
201
e4
205
202
)))
206
203
( (App( (Variable 'label) (Variable label-name) )) (
Original file line number Diff line number Diff line change @@ -11,16 +11,17 @@ main := (tail(
11
11
(2u64 (print 2u64))
12
12
(3u64 (print 3u64))
13
13
))
14
+ ()
14
15
(match 2u64 (
15
16
()
16
17
(1u64 (print 1u64))
17
18
(2u64 (print 2u64))
18
19
(3u64 (print 3u64))
19
20
))
20
- (match 3u64 (
21
- ()
22
- (1u64 (print 1u64))
23
- (2u64 (print 2u64))
24
- (3u64 (print 3u64))
25
- ))
21
+ # (match 3u64 (
22
+ # ()
23
+ # (1u64 (print 1u64))
24
+ # (2u64 (print 2u64))
25
+ # (3u64 (print 3u64))
26
+ # ))
26
27
));
You can’t perform that action at this time.
0 commit comments