X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fpred.lisp;h=f2e2e6b91844ad68c0cfce547d7e9a4e4de1ca04;hb=cee8ef591040db9a79cdd19297867672a9529051;hp=9f8ac786d42bde91421191a8bd78b2c975c3a87a;hpb=829ced3e78a23ba153ba4db64e6ea6984c2313b6;p=sbcl.git diff --git a/src/code/pred.lisp b/src/code/pred.lisp index 9f8ac78..f2e2e6b 100644 --- a/src/code/pred.lisp +++ b/src/code/pred.lisp @@ -85,7 +85,10 @@ (def-type-predicate-wrapper array-header-p) (def-type-predicate-wrapper arrayp) (def-type-predicate-wrapper atom) - (def-type-predicate-wrapper base-char-p) + ;; Testing for BASE-CHAR-P is usually redundant on #-sb-unicode, + ;; remove it there completely so that #-sb-unicode build will + ;; break when it's used. + #!+sb-unicode (def-type-predicate-wrapper base-char-p) (def-type-predicate-wrapper base-string-p) #!+sb-unicode (def-type-predicate-wrapper character-string-p) (def-type-predicate-wrapper bignump) @@ -149,6 +152,12 @@ (def-type-predicate-wrapper stringp) (def-type-predicate-wrapper vectorp) (def-type-predicate-wrapper vector-nil-p)) + +#!+(or x86 x86-64) +(defun fixnum-mod-p (x limit) + (and (fixnump x) + (<= 0 x limit))) + ;;; Return the specifier for the type of object. This is not simply ;;; (TYPE-SPECIFIER (CTYPE-OF OBJECT)) because CTYPE-OF has different @@ -237,16 +246,18 @@ (defun bit-vector-= (x y) (declare (type bit-vector x y)) - (if (and (simple-bit-vector-p x) - (simple-bit-vector-p y)) - (bit-vector-= x y) ; DEFTRANSFORM - (and (= (length x) (length y)) - (do ((i 0 (1+ i)) - (length (length x))) - ((= i length) t) - (declare (fixnum i)) - (unless (= (bit x i) (bit y i)) - (return nil)))))) + (cond ((eq x y)) + ((and (simple-bit-vector-p x) + (simple-bit-vector-p y)) + (bit-vector-= x y)) ; DEFTRANSFORM + (t + (and (= (length x) (length y)) + (do ((i 0 (1+ i)) + (length (length x))) + ((= i length) t) + (declare (fixnum i)) + (unless (= (bit x i) (bit y i)) + (return nil))))))) (defun equal (x y) #!+sb-doc