(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)
(char-code ,ch)))))
(defun two-arg-char-equal (c1 c2)
- (or (eq c1 c2)
- (typecase c1
- (base-char
- (and (base-char-p c2)
- (let* ((code1 (char-code c1))
- (code2 (char-code c2))
- (sum (logxor code1 code2)))
- (when (eql sum #x20)
- (let ((sum (+ code1 code2)))
- (or (and (> sum 161) (< sum 213))
- (and (> sum 415) (< sum 461))
- (and (> sum 463) (< sum 477))))))))
- (t
- (= (equal-char-code c1) (equal-char-code c2))))))
+ (flet ((base-char-equal-p ()
+ (let* ((code1 (char-code c1))
+ (code2 (char-code c2))
+ (sum (logxor code1 code2)))
+ (when (eql sum #x20)
+ (let ((sum (+ code1 code2)))
+ (or (and (> sum 161) (< sum 213))
+ (and (> sum 415) (< sum 461))
+ (and (> sum 463) (< sum 477))))))))
+ (declare (inline base-char-equal-p))
+ (or (eq c1 c2)
+ #!-sb-unicode
+ (base-char-equal-p)
+ #!+sb-unicode
+ (typecase c1
+ (base-char
+ (and (base-char-p c2)
+ (base-char-equal-p)))
+ (t
+ (= (equal-char-code c1) (equal-char-code c2)))))))
(defun char-equal-constant (x char reverse-case-char)
(declare (type character x))
complex-rational-p complex-float-p complex-single-float-p
complex-double-float-p #!+long-float complex-long-float-p
complex-vector-p
- base-char-p %standard-char-p %instancep
+ #!+sb-unicode base-char-p
+ %standard-char-p %instancep
base-string-p simple-base-string-p
#!+sb-unicode character-string-p
#!+sb-unicode simple-character-string-p
(define-source-transform %set-funcallable-instance-layout (x val)
`(setf (%funcallable-instance-info ,x 0) (the layout ,val)))
\f
-;;;; character support
-
-;;; In our implementation there are really only BASE-CHARs.
-#+nil
-(define-source-transform characterp (obj)
- `(base-char-p ,obj))
-\f
;;;; simplifying HAIRY-DATA-VECTOR-REF and HAIRY-DATA-VECTOR-SET
(deftransform hairy-data-vector-ref ((string index) (simple-string t))
(aver (integerp value))
(cons type value))
((:base-char)
- (aver (base-char-p value))
+ #!+sb-unicode (aver (base-char-p value))
(cons :byte (char-code value)))
((:character)
(aver (characterp value))
(aver (integerp value))
(cons type value))
((:base-char)
- (aver (base-char-p value))
+ #!+sb-unicode (aver (base-char-p value))
(cons :byte (char-code value)))
((:character)
(aver (characterp value))