Handle run-program with :directory nil.
[sbcl.git] / src / code / pred.lisp
index f303f81..f2e2e6b 100644 (file)
   (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)
   (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)))
+
 \f
 ;;; Return the specifier for the type of object. This is not simply
 ;;; (TYPE-SPECIFIER (CTYPE-OF OBJECT)) because CTYPE-OF has different
     (extended-char 'extended-char)
     ((member t) 'boolean)
     (keyword 'keyword)
-    ((or array complex)
+    ((or array complex #!+sb-simd-pack sb!kernel:simd-pack)
      (type-specifier (ctype-of object)))
     (t
      (let* ((classoid (layout-classoid (layout-of object)))
 
 (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