+;;;; generic type testing and checking VOPs
+
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+;;;;
+;;;; This software is derived from the CMU CL system, which was
+;;;; written at Carnegie Mellon University and released into the
+;;;; public domain. The software is in the public domain and is
+;;;; provided with absolutely no warranty. See the COPYING and CREDITS
+;;;; files for more information.
(in-package "SB!VM")
-
+\f
(!define-type-vops fixnump check-fixnum fixnum object-not-fixnum-error
(even-fixnum-lowtag odd-fixnum-lowtag)
;; we can save a register on the x86.
- :variant simple)
+ :variant simple
+ ;; we can save a couple of instructions and a branch on the ppc.
+ ;; FIXME: make this be FIXNUM-MASK
+ :mask 3)
(!define-type-vops functionp check-fun function object-not-fun-error
- (fun-pointer-lowtag))
+ (fun-pointer-lowtag)
+ :mask lowtag-mask)
(!define-type-vops listp check-list list object-not-list-error
- (list-pointer-lowtag))
+ (list-pointer-lowtag)
+ :mask lowtag-mask)
(!define-type-vops %instancep check-instance instance object-not-instance-error
- (instance-pointer-lowtag))
+ (instance-pointer-lowtag)
+ :mask lowtag-mask)
(!define-type-vops bignump check-bignum bignum object-not-bignum-error
(bignum-widetag))
object-not-simple-vector-error
(simple-vector-widetag))
+(!define-type-vops simple-array-nil-p
+ check-simple-array-nil
+ simple-array-nil
+ object-not-simple-array-nil-error
+ (simple-array-nil-widetag))
+
(!define-type-vops simple-array-unsigned-byte-2-p
check-simple-array-unsigned-byte-2
simple-array-unsigned-byte-2
(!define-type-vops vectorp check-vector nil object-not-vector-error
(simple-string-widetag
+ simple-array-nil-widetag
simple-bit-vector-widetag
simple-vector-widetag
simple-array-unsigned-byte-2-widetag
object-not-simple-array-error
(simple-array-widetag
simple-string-widetag
+ simple-array-nil-widetag
simple-bit-vector-widetag
simple-vector-widetag
simple-array-unsigned-byte-2-widetag
(!define-type-vops arrayp check-array nil object-not-array-error
(simple-array-widetag
simple-string-widetag
+ simple-array-nil-widetag
simple-bit-vector-widetag
simple-vector-widetag
simple-array-unsigned-byte-2-widetag