;; FIXME: It's actually not clear that COERCE on non-NUMBER types
;; is FOLDABLE at all. Check this.
(movable #-sb-xc-host foldable)
- :derive-type (result-type-specifier-nth-arg 2))
+ ;; :DERIVE-TYPE RESULT-TYPE-SPEC-NTH-ARG 2 ? Nope... (COERCE 1 'COMPLEX)
+ ;; returns REAL/INTEGER, not COMPLEX.
+ )
(defknown list-to-vector* (list type-specifier) vector)
(defknown vector-to-vector* (vector type-specifier) vector)
upper-case-p lower-case-p both-case-p alphanumericp)
(character) boolean (movable foldable flushable))
-(defknown digit-char-p (character &optional unsigned-byte)
+(defknown digit-char-p (character &optional (integer 2 36))
(or (integer 0 35) null) (movable foldable flushable))
(defknown (char= char/= char< char> char<= char>= char-equal char-not-equal
(defknown char-code (character) char-code (movable foldable flushable))
(defknown (char-upcase char-downcase) (character) character
(movable foldable flushable))
-(defknown digit-char (integer &optional integer)
+(defknown digit-char (unsigned-byte &optional (integer 2 36))
(or character null) (movable foldable flushable))
(defknown char-int (character) char-code (movable foldable flushable))
(defknown char-name (character) (or simple-string null)
:derive-type (sequence-result-nth-arg 1))
(defknown copy-seq (sequence) consed-sequence (flushable)
- :derive-type #'result-type-first-arg)
+ :derive-type (sequence-result-nth-arg 1))
(defknown length (sequence) index (foldable flushable))
(defknown reverse (sequence) consed-sequence (flushable)
- :derive-type #'result-type-first-arg)
+ :derive-type (sequence-result-nth-arg 1))
(defknown nreverse (sequence) sequence ()
:derive-type #'result-type-first-arg)
(defknown remove
(t sequence &key (:from-end t) (:test callable)
(:test-not callable) (:start index) (:end sequence-end)
- (:count sequence-end) (:key callable))
+ (:count sequence-count) (:key callable))
consed-sequence
(flushable call)
:derive-type (sequence-result-nth-arg 2))
(defknown substitute
(t t sequence &key (:from-end t) (:test callable)
(:test-not callable) (:start index) (:end sequence-end)
- (:count sequence-end) (:key callable))
+ (:count sequence-count) (:key callable))
consed-sequence
(flushable call)
:derive-type (sequence-result-nth-arg 3))
(defknown (remove-if remove-if-not)
(callable sequence &key (:from-end t) (:start index) (:end sequence-end)
- (:count sequence-end) (:key callable))
+ (:count sequence-count) (:key callable))
consed-sequence
(flushable call)
:derive-type (sequence-result-nth-arg 2))
(defknown (substitute-if substitute-if-not)
(t callable sequence &key (:from-end t) (:start index) (:end sequence-end)
- (:count sequence-end) (:key callable))
+ (:count sequence-count) (:key callable))
consed-sequence
(flushable call)
:derive-type (sequence-result-nth-arg 3))
(defknown delete
(t sequence &key (:from-end t) (:test callable)
(:test-not callable) (:start index) (:end sequence-end)
- (:count sequence-end) (:key callable))
+ (:count sequence-count) (:key callable))
sequence
(flushable call)
:derive-type (sequence-result-nth-arg 2))
(defknown nsubstitute
(t t sequence &key (:from-end t) (:test callable)
(:test-not callable) (:start index) (:end sequence-end)
- (:count sequence-end) (:key callable))
+ (:count sequence-count) (:key callable))
sequence
(flushable call)
:derive-type (sequence-result-nth-arg 3))
(defknown (delete-if delete-if-not)
(callable sequence &key (:from-end t) (:start index) (:end sequence-end)
- (:count sequence-end) (:key callable))
+ (:count sequence-count) (:key callable))
sequence
(flushable call)
:derive-type (sequence-result-nth-arg 2))
(defknown (nsubstitute-if nsubstitute-if-not)
(t callable sequence &key (:from-end t) (:start index) (:end sequence-end)
- (:count sequence-end) (:key callable))
+ (:count sequence-count) (:key callable))
sequence
(flushable call)
:derive-type (sequence-result-nth-arg 3))
(defknown (stable-sort sort) (sequence callable &key (:key callable)) sequence
(call)
:derive-type (sequence-result-nth-arg 1))
+(defknown sb!impl::sort-vector (vector index index function (or function null)) vector
+ (call))
(defknown merge (type-specifier sequence sequence callable
&key (:key callable))
(movable flushable unsafe))
;;; All but last must be of type LIST, but there seems to be no way to
-;;; express that in this syntax..
+;;; express that in this syntax.
(defknown append (&rest t) t (flushable))
(defknown copy-list (list) list (flushable))
(defknown copy-alist (list) list (flushable))
(defknown copy-tree (t) t (flushable recursive))
(defknown revappend (list t) t (flushable))
-(defknown nconc (&rest list) list ())
+
+;;; All but last must be of type LIST, but there seems to be no way to
+;;; express that in this syntax. The result must be LIST, but we do
+;;; not check it now :-).
+(defknown nconc (&rest t) t ())
+
(defknown nreconc (list t) list ())
(defknown butlast (list &optional index) list (flushable))
(defknown nbutlast (list &optional index) list ())
#|:derive-type #'result-type-last-arg|#)
(defknown array-has-fill-pointer-p (array) boolean
- (movable foldable unsafely-flushable))
+ (movable foldable flushable))
(defknown fill-pointer (vector) index (foldable unsafely-flushable))
(defknown vector-push (t vector) (or index null) ())
(defknown vector-push-extend (t vector &optional index) index ())
(defknown adjust-array
(array (or index list) &key (:element-type type-specifier)
- (:initial-element t) (:initial-contents list)
+ (:initial-element t) (:initial-contents t)
(:fill-pointer t) (:displaced-to (or array null))
(:displaced-index-offset index))
array (unsafe))
())
(defknown logical-pathname (pathname-designator) logical-pathname ())
-(defknown translate-logical-pathname (pathname-designator &key) pathname ())
+(defknown translate-logical-pathname (pathname-designator &key) pathname
+ (recursive))
(defknown load-logical-pathname-translations (string) t ())
(defknown logical-pathname-translations (logical-host-designator) list ())
(defknown hairy-data-vector-ref (array index) t
(foldable flushable explicit-check))
(defknown hairy-data-vector-set (array index t) t (unsafe explicit-check))
-(defknown sb!kernel:%caller-frame-and-pc () (values t t) (flushable))
-(defknown sb!kernel:%with-array-data (array index (or index null))
+(defknown %caller-frame-and-pc () (values t t) (flushable))
+(defknown %with-array-data (array index (or index null))
(values (simple-array * (*)) index index index)
(foldable flushable))
(defknown %set-symbol-package (symbol t) t (unsafe))
(function sequence t index sequence-end function)
(values t (or index null))
(call))
+(defknown effective-find-position-test (callable callable)
+ function
+ (flushable foldable))
+(defknown effective-find-position-key (callable)
+ function
+ (flushable foldable))
+
-(defknown sb!kernel::arg-count-error (t t t t t t) nil (unsafe))
+(defknown arg-count-error (t t t t t t) nil (unsafe))
\f
;;;; SETF inverses