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)
3535 cat $< | racket -t compile-stdin.rkt -m > $@
3636
3737clean :
38- rm * .o * .s * .run
38+ @$(RM ) * .o * .s * .run || :
39+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
3940
4041% .test : % .run % .rkt
4142 @test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ runtime.o: $(objs)
3535 cat $< | racket -t compile-stdin.rkt -m > $@
3636
3737clean :
38- rm * .o * .s * .run
38+ @$(RM ) * .o * .s * .run || :
39+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
3940
4041% .test : % .run % .rkt
4142 @test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ runtime.o: $(objs)
3535 cat $< | racket -t compile-stdin.rkt -m > $@
3636
3737clean :
38- rm * .o * .s * .run
38+ @$(RM ) * .o * .s * .run || :
39+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
3940
4041% .test : % .run % .rkt
4142 @test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ runtime.o: $(objs)
3636 cat $< | racket -t compile-stdin.rkt -m > $@
3737
3838clean :
39- rm * .o * .s * .run
39+ @$(RM ) * .o * .s * .run || :
40+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
4041
4142% .test : % .run % .rkt
4243 @test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ runtime.o: $(objs)
3636 cat $< | racket -t compile-stdin.rkt -m > $@
3737
3838clean :
39- rm * .o * .s * .run
39+ @$(RM ) * .o * .s * .run || :
40+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
4041
4142% .test : % .run % .rkt
4243 @test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ runtime.o: $(objs)
3737 cat $< | racket -t compile-stdin.rkt -m > $@
3838
3939clean :
40- rm * .o * .s * .run
40+ @$(RM ) * .o * .s * .run || :
41+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
4142
4243% .test : % .run % .rkt
4344 @test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ runtime.o: $(objs)
3737 cat $< | racket -t compile-stdin.rkt -m > $@
3838
3939clean :
40- rm * .o * .s * .run
40+ @$(RM ) * .o * .s * .run || :
41+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
4142
4243% .test : % .run % .rkt
4344 @test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ runtime.o: $(objs)
3737 cat $< | racket -t compile-stdin.rkt -m > $@
3838
3939clean :
40- rm * .o * .s * .run
40+ @$(RM ) * .o * .s * .run || :
41+ @echo " $( shell basename $( shell pwd) ) : cleaned!"
4142
4243% .test : % .run % .rkt
4344 @test " $( shell ./$( < ) ) " = " $( shell racket $( word 2,$^) ) "
Original file line number Diff line number Diff line change 44(require racket/runtime-path)
55(define-runtime-path here ". " )
66
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 " ))
1011
1112(define runtime-path
1213 (normalize-path (build-path here "runtime.o " )))
Original file line number Diff line number Diff line change 5353
5454;; Op0 -> Asm
5555(define (compile-prim0 p)
56- (compile-op0 p))
57-
58- ;; Op1 Expr CEnv -> Asm
56+ (compile-op0 p));; Op1 Expr CEnv -> Asm
5957(define (compile-prim1 p e c)
6058 (seq (compile-e e c)
6159 (compile-op1 p)))
6563 (seq (compile-e e1 c)
6664 (Push rax)
6765 (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
7167(define (compile-if e1 e2 e3 c)
7268 (let ((l1 (gensym 'if ))
7369 (l2 (gensym 'if )))
7874 (Jmp l2)
7975 (Label l1)
8076 (compile-e e3 c)
81- (Label l2))))
82-
83- ;; Expr Expr CEnv -> Asm
77+ (Label l2))));; Expr Expr CEnv -> Asm
8478(define (compile-begin e1 e2 c)
8579 (seq (compile-e e1 c)
8680 (compile-e e2 c)))
10094 (match (eq? x y)
10195 [#t 0 ]
10296 [#f (+ 8 (lookup x rest))])]))
97+
You can’t perform that action at this time.
0 commit comments