Skip to content

Commit be56bd3

Browse files
committed
Fix unload-bits bug.
1 parent 264b796 commit be56bd3

20 files changed

Lines changed: 20 additions & 10 deletions

langs/hoax/test/test-runner.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
;; Hustle examples
8989
(check-equal? (run ''()) '())
9090
(check-equal? (run '(box 1)) (box 1))
91+
(check-equal? (run '(box -1)) (box -1))
9192
(check-equal? (run '(cons 1 2)) (cons 1 2))
9293
(check-equal? (run '(unbox (box 1))) 1)
9394
(check-equal? (run '(car (cons 1 2))) 1)

langs/hoax/unload-bits-asm.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
(integer-length ptr-mask)))
3838

3939
(define (heap-ref i)
40-
(ptr-ref (cast (untag i) _int64 _pointer) _uint64))
40+
(ptr-ref (cast (untag i) _int64 _pointer) _int64))
4141

4242
(define (char-ref i j)
4343
(integer->char (ptr-ref (cast (untag i) _int64 _pointer) _uint32 j)))

langs/hustle/test/test-runner.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
;; Hustle examples
8787
(check-equal? (run ''()) '())
8888
(check-equal? (run '(box 1)) (box 1))
89+
(check-equal? (run '(box -1)) (box -1))
8990
(check-equal? (run '(cons 1 2)) (cons 1 2))
9091
(check-equal? (run '(unbox (box 1))) 1)
9192
(check-equal? (run '(car (cons 1 2))) 1)

langs/hustle/unload-bits-asm.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
(integer-length ptr-mask)))
2626

2727
(define (heap-ref i)
28-
(ptr-ref (cast (untag i) _int64 _pointer) _uint64))
28+
(ptr-ref (cast (untag i) _int64 _pointer) _int64))

langs/iniquity/test/test-runner.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
;; Hustle examples
9090
(check-equal? (run ''()) '())
9191
(check-equal? (run '(box 1)) (box 1))
92+
(check-equal? (run '(box -1)) (box -1))
9293
(check-equal? (run '(cons 1 2)) (cons 1 2))
9394
(check-equal? (run '(unbox (box 1))) 1)
9495
(check-equal? (run '(car (cons 1 2))) 1)

langs/iniquity/unload-bits-asm.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
(integer-length ptr-mask)))
3838

3939
(define (heap-ref i)
40-
(ptr-ref (cast (untag i) _int64 _pointer) _uint64))
40+
(ptr-ref (cast (untag i) _int64 _pointer) _int64))
4141

4242
(define (char-ref i j)
4343
(integer->char (ptr-ref (cast (untag i) _int64 _pointer) _uint32 j)))

langs/jig/test/test-runner.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
;; Hustle examples
9090
(check-equal? (run ''()) '())
9191
(check-equal? (run '(box 1)) (box 1))
92+
(check-equal? (run '(box -1)) (box -1))
9293
(check-equal? (run '(cons 1 2)) (cons 1 2))
9394
(check-equal? (run '(unbox (box 1))) 1)
9495
(check-equal? (run '(car (cons 1 2))) 1)

langs/jig/unload-bits-asm.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
(integer-length ptr-mask)))
3838

3939
(define (heap-ref i)
40-
(ptr-ref (cast (untag i) _int64 _pointer) _uint64))
40+
(ptr-ref (cast (untag i) _int64 _pointer) _int64))
4141

4242
(define (char-ref i j)
4343
(integer->char (ptr-ref (cast (untag i) _int64 _pointer) _uint32 j)))

langs/knock/test/test-runner.rkt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
;; Hustle examples
9090
(check-equal? (run ''()) '())
9191
(check-equal? (run '(box 1)) (box 1))
92+
(check-equal? (run '(box -1)) (box -1))
9293
(check-equal? (run '(cons 1 2)) (cons 1 2))
9394
(check-equal? (run '(unbox (box 1))) 1)
9495
(check-equal? (run '(car (cons 1 2))) 1)

langs/knock/unload-bits-asm.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
(integer-length ptr-mask)))
3838

3939
(define (heap-ref i)
40-
(ptr-ref (cast (untag i) _int64 _pointer) _uint64))
40+
(ptr-ref (cast (untag i) _int64 _pointer) _int64))
4141

4242
(define (char-ref i j)
4343
(integer->char (ptr-ref (cast (untag i) _int64 _pointer) _uint32 j)))

0 commit comments

Comments
 (0)