Skip to content

Commit 6357c2e

Browse files
committed
add box cons void
1 parent 5ecfed7 commit 6357c2e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: compile.rkt

+7-7
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363
[(Prim1 p e0)
6464
(match p
6565
['add1 (begin (check-op-return-type f e et 'Int) ())]
66-
['sub1]
67-
['zero?]
68-
['char?]
69-
['char->integer]
70-
['integer->char]
71-
['eof-object?]
72-
['write-byte]
66+
['sub1 (begin (check-op-return-type f e et 'Int) ())]
67+
['zero? (begin (check-op-return-type f e et 'Bool) ())]
68+
['char? (begin (check-op-return-type f e et 'Bool) ())]
69+
['char->integer (begin (check-op-return-type f e et 'Int) ())]
70+
['integer->char (begin (check-op-return-type f e et 'Char) ())]
71+
['eof-object? (begin (check-op-return-type f e et 'Bool) ())]
72+
['write-byte (begin (check-op-return-type f e et 'Void) ())]
7373
['box]
7474
['unbox]
7575
['car]

Diff for: types.rkt

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
(zero? (bitwise-xor (bitwise-and v imm-mask) type-str)))
6767

6868
(define types
69-
'(Int Bool Char Str Vector Eof Empty Any))
69+
'(Int Bool Char Str Vector Eof Empty Box Cons Void Any))
7070

7171
(define (is-member e list)
7272
(if (eq? (member e list) #f) #f #t))

0 commit comments

Comments
 (0)