(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
(defun pathname= (pathname1 pathname2)
(declare (type pathname pathname1)
(type pathname pathname2))
- (and (eq (%pathname-host pathname1)
- (%pathname-host pathname2))
- (compare-component (%pathname-device pathname1)
- (%pathname-device pathname2))
- (compare-component (%pathname-directory pathname1)
- (%pathname-directory pathname2))
- (compare-component (%pathname-name pathname1)
- (%pathname-name pathname2))
- (compare-component (%pathname-type pathname1)
- (%pathname-type pathname2))
- (or (eq (%pathname-host pathname1) *unix-host*)
- (compare-component (%pathname-version pathname1)
- (%pathname-version pathname2)))))
+ (or (eq pathname1 pathname2)
+ (and (eq (%pathname-host pathname1)
+ (%pathname-host pathname2))
+ (compare-component (%pathname-device pathname1)
+ (%pathname-device pathname2))
+ (compare-component (%pathname-directory pathname1)
+ (%pathname-directory pathname2))
+ (compare-component (%pathname-name pathname1)
+ (%pathname-name pathname2))
+ (compare-component (%pathname-type pathname1)
+ (%pathname-type pathname2))
+ (or (eq (%pathname-host pathname1) *unix-host*)
+ (compare-component (%pathname-version pathname1)
+ (%pathname-version pathname2))))))
;;; Convert PATHNAME-DESIGNATOR (a pathname, or string, or
;;; stream), into a pathname in pathname.