File tree Expand file tree Collapse file tree 23 files changed +52
-35
lines changed Expand file tree Collapse file tree 23 files changed +52
-35
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ runtime.o: $(objs)
35
35
cat $< | racket -t compile-stdin.rkt -m > $@
36
36
37
37
clean :
38
- rm * .o * .s * .run
38
+ @$(RM ) * .o * .s * .run || :
39
+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
39
40
40
41
% .test : % .run % .rkt
41
42
@test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ runtime.o: $(objs)
35
35
cat $< | racket -t compile-stdin.rkt -m > $@
36
36
37
37
clean :
38
- rm * .o * .s * .run
38
+ @$(RM ) * .o * .s * .run || :
39
+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
39
40
40
41
% .test : % .run % .rkt
41
42
@test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ runtime.o: $(objs)
35
35
cat $< | racket -t compile-stdin.rkt -m > $@
36
36
37
37
clean :
38
- rm * .o * .s * .run
38
+ @$(RM ) * .o * .s * .run || :
39
+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
39
40
40
41
% .test : % .run % .rkt
41
42
@test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ runtime.o: $(objs)
36
36
cat $< | racket -t compile-stdin.rkt -m > $@
37
37
38
38
clean :
39
- rm * .o * .s * .run
39
+ @$(RM ) * .o * .s * .run || :
40
+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
40
41
41
42
% .test : % .run % .rkt
42
43
@test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ runtime.o: $(objs)
36
36
cat $< | racket -t compile-stdin.rkt -m > $@
37
37
38
38
clean :
39
- rm * .o * .s * .run
39
+ @$(RM ) * .o * .s * .run || :
40
+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
40
41
41
42
% .test : % .run % .rkt
42
43
@test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ runtime.o: $(objs)
37
37
cat $< | racket -t compile-stdin.rkt -m > $@
38
38
39
39
clean :
40
- rm * .o * .s * .run
40
+ @$(RM ) * .o * .s * .run || :
41
+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
41
42
42
43
% .test : % .run % .rkt
43
44
@test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ runtime.o: $(objs)
37
37
cat $< | racket -t compile-stdin.rkt -m > $@
38
38
39
39
clean :
40
- rm * .o * .s * .run
40
+ @$(RM ) * .o * .s * .run || :
41
+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
41
42
42
43
% .test : % .run % .rkt
43
44
@test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ runtime.o: $(objs)
37
37
cat $< | racket -t compile-stdin.rkt -m > $@
38
38
39
39
clean :
40
- rm * .o * .s * .run
40
+ @$(RM ) * .o * .s * .run || :
41
+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
41
42
42
43
% .test : % .run % .rkt
43
44
@test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change 4
4
(require racket/runtime-path)
5
5
(define-runtime-path here ". " )
6
6
7
- (system (string-append "make -C ' "
8
- (path->string (normalize-path here))
9
- "' runtime.o " ))
7
+ (unless (system (string-append "make -C ' "
8
+ (path->string (normalize-path here))
9
+ "' runtime.o " ))
10
+ (error 'build-runtime "could not build runtime " ))
10
11
11
12
(define runtime-path
12
13
(normalize-path (build-path here "runtime.o " )))
Original file line number Diff line number Diff line change 53
53
54
54
;; Op0 -> Asm
55
55
(define (compile-prim0 p)
56
- (compile-op0 p))
57
-
58
- ;; Op1 Expr CEnv -> Asm
56
+ (compile-op0 p));; Op1 Expr CEnv -> Asm
59
57
(define (compile-prim1 p e c)
60
58
(seq (compile-e e c)
61
59
(compile-op1 p)))
65
63
(seq (compile-e e1 c)
66
64
(Push rax)
67
65
(compile-e e2 (cons #f c))
68
- (compile-op2 p)))
69
-
70
- ;; Expr Expr Expr CEnv -> Asm
66
+ (compile-op2 p)));; Expr Expr Expr CEnv -> Asm
71
67
(define (compile-if e1 e2 e3 c)
72
68
(let ((l1 (gensym 'if ))
73
69
(l2 (gensym 'if )))
78
74
(Jmp l2)
79
75
(Label l1)
80
76
(compile-e e3 c)
81
- (Label l2))))
82
-
83
- ;; Expr Expr CEnv -> Asm
77
+ (Label l2))));; Expr Expr CEnv -> Asm
84
78
(define (compile-begin e1 e2 c)
85
79
(seq (compile-e e1 c)
86
80
(compile-e e2 c)))
100
94
(match (eq? x y)
101
95
[#t 0 ]
102
96
[#f (+ 8 (lookup x rest))])]))
97
+
You can’t perform that action at this time.
0 commit comments