cs: use black hole for unsafe-undefined
representation
This commit is contained in:
parent
ad9dc342f8
commit
8da6e9bd6b
|
@ -172,8 +172,10 @@
|
||||||
(define (unsafe-flimag-part c)
|
(define (unsafe-flimag-part c)
|
||||||
(#3%imag-part c))
|
(#3%imag-part c))
|
||||||
|
|
||||||
(define unsafe-undefined (let ([p (make-record-type "undefined" '())])
|
;; The black hole object is an immediate in Chez Scheme,
|
||||||
((record-constructor p))))
|
;; so a use is compact and the optimize can recognize
|
||||||
|
;; comparsions to itself:
|
||||||
|
(define unsafe-undefined '#0=#0#)
|
||||||
|
|
||||||
(define (check-not-unsafe-undefined v sym)
|
(define (check-not-unsafe-undefined v sym)
|
||||||
(when (eq? v unsafe-undefined)
|
(when (eq? v unsafe-undefined)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user