(movable foldable flushable explicit-check))
(defknown decode-float (float) (values float float-exponent float)
- (movable foldable flushable explicit-check))
+ (movable foldable unsafely-flushable explicit-check))
(defknown scale-float (float integer) float
(movable foldable unsafely-flushable explicit-check))
(defknown float-radix (float) float-radix
- (movable foldable flushable))
+ (movable foldable unsafely-flushable))
(defknown float-sign (float &optional float) float
- (movable foldable flushable explicit-check))
+ (movable foldable unsafely-flushable explicit-check))
(defknown (float-digits float-precision) (float) float-digits
- (movable foldable flushable explicit-check))
+ (movable foldable unsafely-flushable explicit-check))
(defknown integer-decode-float (float)
- (values integer float-int-exponent (member -1 1))
- (movable foldable flushable explicit-check))
+ (values integer float-int-exponent (member -1 1))
+ (movable foldable unsafely-flushable explicit-check))
(defknown complex (real &optional real) number
(movable foldable flushable explicit-check))
(:start index) (:end sequence-end)) sequence
(unsafe)
:derive-type #'result-type-first-arg
- :destroyed-constant-args (nth-constant-nonempty-sequence-args 1))
+ :destroyed-constant-args (nth-constant-nonempty-sequence-args 1)
+ :result-arg 0)
(defknown replace (sequence sequence &rest t &key (:start1 index)
(:end1 sequence-end) (:start2 index) (:end2 sequence-end))
sequence ()
:derive-type #'result-type-first-arg
- :destroyed-constant-args (nth-constant-nonempty-sequence-args 1))
+ :destroyed-constant-args (nth-constant-nonempty-sequence-args 1)
+ :result-arg 0)
(defknown remove
(t sequence &rest t &key (:from-end t) (:test callable)
(&key (:test callable) (:size unsigned-byte)
(:rehash-size (or (integer 1) (float (1.0))))
(:rehash-threshold (real 0 1))
+ (:hash-function (or null callable))
(:weakness (member nil :key :value :key-and-value :key-or-value))
(:synchronized t))
hash-table
(foldable flushable))
(defknown hash-table-size (hash-table) index (flushable))
(defknown hash-table-test (hash-table) symbol (foldable flushable))
-(defknown sxhash (t) (integer 0 #.sb!xc:most-positive-fixnum)
- (#-sb-xc-host foldable flushable))
-(defknown psxhash (t &optional t) (integer 0 #.sb!xc:most-positive-fixnum)
- (#-sb-xc-host foldable flushable))
+(defknown sxhash (t) hash (#-sb-xc-host foldable flushable))
+(defknown psxhash (t &optional t) hash (#-sb-xc-host foldable flushable))
\f
;;;; from the "Arrays" chapter
(defknown fill-pointer (vector) index (foldable unsafely-flushable))
(defknown vector-push (t vector) (or index null) ()
:destroyed-constant-args (nth-constant-args 2))
-(defknown vector-push-extend (t vector &optional index) index ()
+(defknown vector-push-extend (t vector &optional (and index (integer 1)))
+ index ()
:destroyed-constant-args (nth-constant-args 2))
(defknown vector-pop (vector) t ()
:destroyed-constant-args (nth-constant-args 1))
(:external-format keyword))
t)
-(defknown directory (pathname-designator &key)
+(defknown directory (pathname-designator &key (:resolve-symlinks t))
list ())
\f
;;;; from the "Conditions" chapter:
(:stream stream) (:use-labels t))
null)
-(defknown fdocumentation (t symbol)
- (or string null)
- (flushable))
-
(defknown describe (t &optional (or stream (member t nil))) (values))
(defknown inspect (t) (values))
(defknown room (&optional (member t nil :default)) (values))
\f
;;;; miscellaneous extensions
+(defknown symbol-global-value (symbol) t ())
+(defknown set-symbol-global-value (symbol t) t ())
+
(defknown get-bytes-consed () unsigned-byte (flushable))
(defknown mask-signed-field ((integer 0 *) integer) integer
(movable flushable foldable))
-
-;;; PCOUNTERs
-(defknown incf-pcounter (pcounter unsigned-byte) pcounter)
-(defknown pcounter->integer (pcounter) unsigned-byte)
-(defknown %incf-pcounter-or-fixnum ((or pcounter fixnum) unsigned-byte)
- (or pcounter fixnum))
-(defknown pcounter-or-fixnum->integer ((or pcounter fixnum)) unsigned-byte)
\f
;;;; magical compiler frobs
+(defknown %unary-truncate/single-float (single-float) integer (movable foldable flushable))
+(defknown %unary-truncate/double-float (double-float) integer (movable foldable flushable))
+
;;; We can't fold this in general because of SATISFIES. There is a
;;; special optimizer anyway.
(defknown %typep (t (or type-specifier ctype)) boolean
;; FIXME: This function does not return, but due to the implementation
;; of FILTER-LVAR we cannot write it here.
(defknown %compile-time-type-error (t t t) *)
+(defknown sb!kernel::case-failure (t t t) nil)
(defknown %odd-key-args-error () nil)
(defknown %unknown-key-arg-error (t) nil)
(defknown hairy-data-vector-set/check-bounds (array index t)
t
(unsafe explicit-check))
-(defknown %caller-frame-and-pc () (values t t) (flushable))
+(defknown %caller-frame () t (flushable))
+(defknown %caller-pc () system-area-pointer (flushable))
(defknown %with-array-data (array index (or index null))
(values (simple-array * (*)) index index index)
(foldable flushable))
(defknown %set-symbol-value (symbol t) t (unsafe))
(defknown (setf symbol-function) (function symbol) function (unsafe))
(defknown %set-symbol-plist (symbol list) list (unsafe))
-(defknown (setf fdocumentation) ((or string null) t symbol)
- (or string null)
- ())
(defknown %setnth (unsigned-byte list t) t (unsafe)
:destroyed-constant-args (nth-constant-args 2))
(defknown %set-fill-pointer (vector index) index (unsafe)