EXT:BASE-STRING-P and EXT:BASE-CHARACTER-P are now compiled even without Unicode, to make code more uniform.

This commit is contained in:
jgarcia 2006-11-12 10:09:46 +00:00
parent d5e5650254
commit 5e2204136e
3 changed files with 11 additions and 21 deletions

View file

@ -976,18 +976,15 @@
(proclaim-function characterp (t) t :predicate t :no-side-effects t)
(def-inline characterp :always (t) :bool "CHARACTERP(#0)")
#+unicode #+unicode
(proclaim-function base-char-p (t) t :predicate t :no-side-effects t)
(def-inline base-char-p :always (t) :bool "BASE_CHAR_P(#0)")
(def-inline base-char-p :always (character) :bool "BASE_CHAR_P(#0)")
(proclaim-function stringp (t) t :predicate t :no-side-effects t)
#-unicode
(def-inline stringp :always (t) :bool "type_of(#0)==t_base_string")
#+unicode
(def-inline base-string-p :always (t) :bool "type_of(#0)==t_base_string")
#+unicode
(def-inline stringp :always (t) :bool "ecl_stringp(#0)")
(proclaim-function base-string-p (t) t :predicate t :no-side-effects t)
(def-inline base-string-p :always (t) :bool "type_of(#0)==t_base_string")
(proclaim-function bit-vector-p (t) t :predicate t :no-side-effects t)
(def-inline bit-vector-p :always (t) :bool "(type_of(#0)==t_bitvector)")

View file

@ -197,9 +197,6 @@ has no fill-pointer, and is not adjustable."
(ATOM . ATOM)
#-unicode
(EXTENDED-CHAR . CONSTANTLY-NIL)
#-unicode
(BASE-CHAR . CHARACTERP)
#+unicode
(BASE-CHAR . BASE-CHAR-P)
(CHARACTER . CHARACTERP)
(COMPILED-FUNCTION . COMPILED-FUNCTION-P)
@ -350,25 +347,22 @@ Returns T if X belongs to TYPE; NIL otherwise."
(CONS (and (consp object)
(or (endp i) (typep (car object) (first i)))
(or (endp (cdr i)) (typep (cdr object) (second i)))))
(BASE-STRING
(and (base-string-p object)
(or (null i) (match-dimensions object i))))
(STRING
(and (stringp object)
(or (null i) (match-dimensions object i))))
#+unicode
(BASE-STRING
(and (stringp object)
(typep (array-element-type object) 'base-char)
(or (null i) (match-dimensions object i))))
(BIT-VECTOR
(and (bit-vector-p object)
(or (null i) (match-dimensions object i))))
(SIMPLE-BASE-STRING
(and (base-string-p object)
(simple-string-p object)
(or (null i) (match-dimensions object i))))
(SIMPLE-STRING
(and (simple-string-p object)
(or (null i) (match-dimensions object i))))
#+unicode
(SIMPLE-BASE-STRING
(and (simple-string-p object)
(base-string-p object)
(or (null i) (match-dimensions object i))))
(SIMPLE-BIT-VECTOR
(and (simple-bit-vector-p object)
(or (null i) (match-dimensions object i))))

View file

@ -16,7 +16,6 @@
(defun seqtype (sequence)
(declare (si::c-local))
(cond ((listp sequence) 'list)
#+unicode
((base-string-p sequence) 'base-string)
((stringp sequence) 'string)
((bit-vector-p sequence) 'bit-vector)