X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ffndb.lisp;h=986689dbc5663cfce79242e82515af81b8ce52b0;hb=4a0ab5193096ca70dbbf43bb21418544f6d018b7;hp=2baedb437b2b321de03b2820c178a65b525bdfcf;hpb=a8fa26a6e9804d3548f5bca9361a91345a689099;p=sbcl.git diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 2baedb4..986689d 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -249,12 +249,12 @@ (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) -#!+sb-propagate-fun-type +#-sb-xc-host ; (See CROSS-FLOAT-INFINITY-KLUDGE.) (defknown exp (number) irrational (movable foldable flushable explicit-check recursive)) @@ -272,7 +272,7 @@ (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)) @@ -289,7 +289,7 @@ :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)) @@ -1058,7 +1058,7 @@ (:start index) (:end sequence-end) (:junk-allowed t)) - (values (or pathname null) index) + (values (or pathname null) sequence-end) ()) (defknown merge-pathnames @@ -1137,14 +1137,10 @@ (: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) -(defknown directory (pathname-designator &key - (:check-for-subdirs t) - (:all t) - (:follow-links t)) +(defknown directory (pathname-designator &key) list (flushable)) ;;;; from the "Errors" chapter: @@ -1162,6 +1158,8 @@ (defknown compile-file (filename &key + + ;; ANSI options (:output-file (or filename null ;; FIXME: This last case is a non-ANSI hack. @@ -1169,8 +1167,10 @@ (:verbose t) (:print t) (:external-format t) + + ;; extensions + (:trace-file t) (:block-compile t) - (:entry-points list) (:byte-compile (member t nil :maybe))) (values (or pathname null) boolean boolean)) @@ -1185,11 +1185,10 @@ (defknown describe (t &optional (or stream (member t nil))) (values)) (defknown inspect (t) (values)) - (defknown room (&optional (member t nil :default)) (values)) (defknown ed (&optional (or symbol cons filename) &key (:init t) (:display t)) t) -(defknown dribble (&optional filename &key (:if-exists t)) t) +(defknown dribble (&optional filename &key (:if-exists t)) (values)) (defknown apropos (stringable &optional package-designator t) (values)) (defknown apropos-list (stringable &optional package-designator t) list @@ -1240,6 +1239,17 @@ (defknown constantly (t) function (movable flushable)) (defknown complement (function) function (movable flushable)) +;;;; 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) + ;;;; magical compiler frobs ;;; We can't fold this in general because of SATISFIES. There is a @@ -1290,6 +1300,15 @@ (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 @@ -1299,6 +1318,8 @@ ;;; 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)) ;;;; SETF inverses @@ -1321,19 +1342,3 @@ ()) (defknown %setnth (index list t) t (unsafe)) (defknown %set-fill-pointer (vector index) index (unsafe)) - -;;;; 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)) - -;;;; miscellaneous "sub-primitives" - -(defknown %sp-string-compare - (simple-string index index simple-string index index) - (or index null) - (foldable flushable))