(in-package "SB!VM")
\f
(!define-type-vops fixnump check-fixnum fixnum object-not-fixnum-error
- (even-fixnum-lowtag odd-fixnum-lowtag)
+ #.fixnum-lowtags
;; we can save a register on the x86.
:variant simple
;; we can save a couple of instructions and a branch on the ppc.
(instance-pointer-lowtag)
:mask lowtag-mask)
+(!define-type-vops %other-pointer-p nil nil nil
+ (other-pointer-lowtag)
+ :mask lowtag-mask)
+
(!define-type-vops bignump check-bignum bignum object-not-bignum-error
(bignum-widetag))
(!define-type-vops complexp check-complex complex object-not-complex-error
(complex-widetag complex-single-float-widetag complex-double-float-widetag
- #!+long-float complex-long-float-widetag))
+ #!+long-float complex-long-float-widetag))
(!define-type-vops complex-rational-p check-complex-rational nil
object-not-complex-rational-error
(!define-type-vops complex-float-p check-complex-float nil
object-not-complex-float-error
(complex-single-float-widetag complex-double-float-widetag
- #!+long-float complex-long-float-widetag))
+ #!+long-float complex-long-float-widetag))
(!define-type-vops complex-single-float-p check-complex-single-float complex-single-float
object-not-complex-single-float-error
(macrolet
((define-simple-array-type-vops ()
- `(progn
- ,@(map 'list
- (lambda (saetp)
- (let ((primtype (saetp-primitive-type-name saetp)))
- `(!define-type-vops
- ,(symbolicate primtype "-P")
- ,(symbolicate "CHECK-" primtype)
- ,primtype
- ,(symbolicate "OBJECT-NOT-" primtype "-ERROR")
- (,(saetp-typecode saetp)))))
- *specialized-array-element-type-properties*))))
+ `(progn
+ ,@(map 'list
+ (lambda (saetp)
+ (let ((primtype (saetp-primitive-type-name saetp)))
+ `(!define-type-vops
+ ,(symbolicate primtype "-P")
+ ,(symbolicate "CHECK-" primtype)
+ ,primtype
+ ,(symbolicate "OBJECT-NOT-" primtype "-ERROR")
+ (,(saetp-typecode saetp)))))
+ *specialized-array-element-type-properties*))))
(define-simple-array-type-vops))
(!define-type-vops characterp check-character character
(complex-vector-widetag .
#.(append
(map 'list
- #'saetp-typecode
- *specialized-array-element-type-properties*)
+ #'saetp-typecode
+ *specialized-array-element-type-properties*)
(mapcan (lambda (saetp)
- (when (saetp-complex-typecode saetp)
- (list (saetp-complex-typecode saetp))))
- (coerce *specialized-array-element-type-properties* 'list)))))
+ (when (saetp-complex-typecode saetp)
+ (list (saetp-complex-typecode saetp))))
+ (coerce *specialized-array-element-type-properties* 'list)))))
;;; Note that this "type VOP" is sort of an oddball; it doesn't so
;;; much test for a Lisp-level type as just expose a low-level type
object-not-simple-array-error
(simple-array-widetag .
#.(map 'list
- #'saetp-typecode
- *specialized-array-element-type-properties*)))
+ #'saetp-typecode
+ *specialized-array-element-type-properties*)))
(!define-type-vops arrayp check-array nil object-not-array-error
(simple-array-widetag
complex-vector-widetag .
#.(append
(map 'list
- #'saetp-typecode
- *specialized-array-element-type-properties*)
+ #'saetp-typecode
+ *specialized-array-element-type-properties*)
(mapcan (lambda (saetp)
- (when (saetp-complex-typecode saetp)
- (list (saetp-complex-typecode saetp))))
- (coerce *specialized-array-element-type-properties* 'list)))))
+ (when (saetp-complex-typecode saetp)
+ (list (saetp-complex-typecode saetp))))
+ (coerce *specialized-array-element-type-properties* 'list)))))
(!define-type-vops numberp check-number nil object-not-number-error
- (even-fixnum-lowtag
- odd-fixnum-lowtag
- bignum-widetag
+ (bignum-widetag
ratio-widetag
single-float-widetag
double-float-widetag
complex-widetag
complex-single-float-widetag
complex-double-float-widetag
- #!+long-float complex-long-float-widetag))
+ #!+long-float complex-long-float-widetag
+ . #.fixnum-lowtags))
(!define-type-vops rationalp check-rational nil object-not-rational-error
- (even-fixnum-lowtag odd-fixnum-lowtag ratio-widetag bignum-widetag))
+ (ratio-widetag bignum-widetag . #.fixnum-lowtags))
(!define-type-vops integerp check-integer nil object-not-integer-error
- (even-fixnum-lowtag odd-fixnum-lowtag bignum-widetag))
+ (bignum-widetag . #.fixnum-lowtags))
(!define-type-vops floatp check-float nil object-not-float-error
(single-float-widetag double-float-widetag #!+long-float long-float-widetag))
(!define-type-vops realp check-real nil object-not-real-error
- (even-fixnum-lowtag
- odd-fixnum-lowtag
- ratio-widetag
+ (ratio-widetag
bignum-widetag
single-float-widetag
double-float-widetag
- #!+long-float long-float-widetag))
+ #!+long-float long-float-widetag
+ . #.fixnum-lowtags))