Skip to content

Commit e5ecc98

Browse files
committed
Remove helper file.
1 parent e3f8597 commit e5ecc98

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

www/notes/fraud/compile.rkt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#lang racket
22
(provide (all-defined-out))
3-
(require "compile/help.rkt")
43

54
;; type CEnv = [Listof Variable]
65

@@ -42,9 +41,6 @@
4241
(jne ,l0)
4342
(mov rax #b11) ; #t
4443
,l0))]
45-
[(? symbol? x)
46-
(let ((i (lookup x c)))
47-
`((mov rax (offset rsp ,(- (add1 i))))))]
4844
[`(if ,e0 ,e1 ,e2)
4945
(let ((c0 (compile-e e0 c))
5046
(c1 (compile-e e1 c))
@@ -59,6 +55,9 @@
5955
,l0
6056
,@c2
6157
,l1))]
58+
[(? symbol? x)
59+
(let ((i (lookup x c)))
60+
`((mov rax (offset rsp ,(- (add1 i))))))]
6261
[`(let ((,x ,e0)) ,e1)
6362
(let ((c0 (compile-e e0 c))
6463
(c1 (compile-e e1 (cons x c))))
@@ -74,3 +73,9 @@
7473
(match (symbol=? x y)
7574
[#t (length cenv)]
7675
[#f (lookup x cenv)])]))
76+
77+
(define assert-integer
78+
`((mov rbx rax)
79+
(and rbx 1)
80+
(cmp rbx 0)
81+
(jne err)))

www/notes/fraud/compile/help.rkt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)