0.pre7.24:
[sbcl.git] / src / compiler / fndb.lisp
index a3d4f15..986689d 100644 (file)
 (defknown lcm (&rest integer) unsigned-byte
   (movable foldable flushable explicit-check))
 
 (defknown lcm (&rest integer) unsigned-byte
   (movable foldable flushable explicit-check))
 
-#!-sb-propagate-fun-type
+#+sb-xc-host ; (See CROSS-FLOAT-INFINITY-KLUDGE.)
 (defknown exp (number) irrational
   (movable foldable flushable explicit-check recursive)
   :derive-type #'result-type-float-contagion)
 
 (defknown exp (number) irrational
   (movable foldable flushable explicit-check recursive)
   :derive-type #'result-type-float-contagion)
 
-#!+sb-propagate-fun-type
+#-sb-xc-host ; (See CROSS-FLOAT-INFINITY-KLUDGE.)
 (defknown exp (number) irrational
   (movable foldable flushable explicit-check recursive))
 
 (defknown exp (number) irrational
   (movable foldable flushable explicit-check recursive))
 
 (defknown cis (real) (complex float)
   (movable foldable flushable explicit-check))
 
 (defknown cis (real) (complex float)
   (movable foldable flushable explicit-check))
 
-#!-sb-propagate-fun-type
+#+sb-xc-host ; (See CROSS-FLOAT-INFINITY-KLUDGE.)
 (progn
 (defknown (sin cos) (number)
   (or (float -1.0 1.0) (complex float))
 (progn
 (defknown (sin cos) (number)
   (or (float -1.0 1.0) (complex float))
   :derive-type #'result-type-float-contagion)
 ) ; PROGN
 
   :derive-type #'result-type-float-contagion)
 ) ; PROGN
 
-#!+sb-propagate-fun-type
+#-sb-xc-host ; (See CROSS-FLOAT-INFINITY-KLUDGE.)
 (progn
 (defknown (sin cos) (number)
   (or (float -1.0 1.0) (complex float))
 (progn
 (defknown (sin cos) (number)
   (or (float -1.0 1.0) (complex float))
    (:verbose t)
    (:print t)
    (:if-does-not-exist (member :error :create nil))
    (:verbose t)
    (:print t)
    (:if-does-not-exist (member :error :create nil))
-   ;; FIXME: ANSI specifies an :EXTERNAL-FORMAT keyword too.
-   )
+   (:external-format (member :default)))
   t)
 
   t)
 
-(defknown directory (pathname-designator &key
-                                        (:check-for-subdirs t)
-                                        (:all t)
-                                        (:follow-links t))
+(defknown directory (pathname-designator &key)
   list (flushable))
 \f
 ;;;; from the "Errors" chapter:
   list (flushable))
 \f
 ;;;; from the "Errors" chapter:
 (defknown compile-file
   (filename
    &key
 (defknown compile-file
   (filename
    &key
+
+   ;; ANSI options
    (:output-file (or filename
                     null
                     ;; FIXME: This last case is a non-ANSI hack.
    (:output-file (or filename
                     null
                     ;; FIXME: This last case is a non-ANSI hack.
    (:verbose t)
    (:print t)
    (:external-format t)
    (:verbose t)
    (:print t)
    (:external-format t)
+
+   ;; extensions
+   (:trace-file t)
    (:block-compile t)
    (:block-compile t)
-   (:entry-points list)
    (:byte-compile (member t nil :maybe)))
   (values (or pathname null) boolean boolean))
 
    (:byte-compile (member t nil :maybe)))
   (values (or pathname null) boolean boolean))
 
 (defknown constantly (t) function (movable flushable))
 (defknown complement (function) function (movable flushable))
 \f
 (defknown constantly (t) function (movable flushable))
 (defknown complement (function) function (movable flushable))
 \f
+;;;; miscellaneous extensions
+
+(defknown get-bytes-consed () unsigned-byte (flushable))
+
+;;; 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
 
 ;;; We can't fold this in general because of SATISFIES. There is a
 ;;;; magical compiler frobs
 
 ;;; We can't fold this in general because of SATISFIES. There is a
 (defknown %set-symbol-package (symbol t) t (unsafe))
 (defknown %coerce-name-to-function ((or symbol cons)) function (flushable))
 (defknown %coerce-callable-to-function (callable) function (flushable))
 (defknown %set-symbol-package (symbol t) t (unsafe))
 (defknown %coerce-name-to-function ((or symbol cons)) function (flushable))
 (defknown %coerce-callable-to-function (callable) function (flushable))
+(defknown failed-%with-array-data (t t t) nil)
+(defknown %find-position
+  (t sequence t index sequence-end function function)
+  (values t (or index null))
+  (flushable call))
+(defknown %find-position-if 
+  (function sequence t index sequence-end function)
+  (values t (or index null))
+  (call))
 
 ;;; Structure slot accessors or setters are magically "known" to be
 ;;; these functions, although the var remains the Slot-Accessor
 
 ;;; Structure slot accessors or setters are magically "known" to be
 ;;; these functions, although the var remains the Slot-Accessor
 ;;; ordinary functions.
 (defknown %slot-accessor (t) t (flushable))
 (defknown %slot-setter (t t) t (unsafe))
 ;;; ordinary functions.
 (defknown %slot-accessor (t) t (flushable))
 (defknown %slot-setter (t t) t (unsafe))
+
+(defknown sb!kernel::do-arg-count-error (t t t t t t) nil (unsafe))
 \f
 ;;;; SETF inverses
 
 \f
 ;;;; SETF inverses
 
   ())
 (defknown %setnth (index list t) t (unsafe))
 (defknown %set-fill-pointer (vector index) index (unsafe))
   ())
 (defknown %setnth (index list t) t (unsafe))
 (defknown %set-fill-pointer (vector index) index (unsafe))
-\f
-;;;; internal type predicates
-
-;;; Simple TYPEP uses that don't have any standard predicate are
-;;; translated into non-standard unary predicates.
-(defknown (fixnump bignump ratiop short-float-p single-float-p double-float-p
-          long-float-p base-char-p %standard-char-p %instancep
-          array-header-p)
-  (t) boolean (movable foldable flushable))
-\f
-;;;; miscellaneous "sub-primitives"
-
-(defknown %sp-string-compare
-  (simple-string index index simple-string index index)
-  (or index null)
-  (foldable flushable))