X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ffndb.lisp;h=1aef68dbf4ecc81dc9972f3b42fdbe7d9e64e40a;hb=0b3f5cc5fa9e6b121d232960ccd964d2eb15f695;hp=1ff4843c001f80358cbb9e504b5263b098b8c8b5;hpb=f73e459ca24cb3a6496ec16196b2ff69bef72ea2;p=sbcl.git diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 1ff4843..1aef68d 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -253,7 +253,7 @@ (defknown expt (number number) number (movable foldable flushable explicit-check recursive)) (defknown log (number &optional real) irrational - (movable foldable flushable explicit-check)) + (movable foldable flushable explicit-check recursive)) (defknown sqrt (number) irrational (movable foldable flushable explicit-check)) (defknown isqrt (unsigned-byte) unsigned-byte @@ -311,10 +311,14 @@ (defknown (numerator denominator) (rational) integer (movable foldable flushable)) -(defknown (floor ceiling truncate round) +(defknown (floor ceiling round) (real &optional real) (values integer real) (movable foldable flushable explicit-check)) +(defknown truncate + (real &optional real) (values integer real) + (movable foldable flushable explicit-check recursive)) + (defknown %multiply-high (word word) word (movable foldable flushable)) @@ -363,6 +367,10 @@ (defknown logbitp (unsigned-byte integer) boolean (movable foldable flushable)) (defknown ash (integer integer) integer (movable foldable flushable explicit-check)) +#!+ash-right-vops +(defknown %ash/right ((or word sb!vm:signed-word) (mod #.sb!vm:n-word-bits)) + (or word sb!vm:signed-word) + (movable foldable flushable always-translatable)) (defknown (logcount integer-length) (integer) bit-index (movable foldable flushable explicit-check)) ;;; FIXME: According to the ANSI spec, it's legal to use any @@ -699,9 +707,19 @@ (defknown make-list (index &key (:initial-element t)) list (movable flushable)) +(defknown sb!impl::backq-list (&rest t) list (movable flushable)) +(defknown sb!impl::backq-list* (t &rest t) t (movable flushable)) +(defknown sb!impl::backq-append (&rest t) t (flushable)) +(defknown sb!impl::backq-nconc (&rest t) t () + :destroyed-constant-args (remove-non-constants-and-nils #'butlast)) +(defknown sb!impl::backq-cons (t t) cons (foldable movable flushable)) +(defknown sb!impl::backq-vector (list) simple-vector + (foldable movable flushable)) + ;;; All but last must be of type LIST, but there seems to be no way to ;;; express that in this syntax. (defknown append (&rest t) t (flushable)) +(defknown sb!impl::append2 (list t) t (flushable)) (defknown copy-list (list) list (flushable)) (defknown copy-alist (list) list (flushable)) @@ -1159,10 +1177,12 @@ :directory :name :type :version)) generalized-boolean - ()) + (recursive)) + (defknown pathname-match-p (pathname-designator pathname-designator) generalized-boolean ()) + (defknown translate-pathname (pathname-designator pathname-designator pathname-designator &key) @@ -1187,7 +1207,7 @@ (:end sequence-end) (:junk-allowed t)) (values (or pathname null) sequence-end) - ()) + (recursive)) (defknown merge-pathnames (pathname-designator &optional pathname-designator pathname-version) @@ -1337,7 +1357,7 @@ (defknown apropos (string-designator &optional package-designator t) (values)) (defknown apropos-list (string-designator &optional package-designator t) list - (flushable)) + (flushable recursive)) (defknown get-decoded-time () (values (integer 0 59) (integer 0 59) (integer 0 23) (integer 1 31) @@ -1361,7 +1381,7 @@ (defknown (get-internal-run-time get-internal-real-time) () internal-time (flushable)) -(defknown sleep ((or (rational 0) (float 0.0))) null) +(defknown sleep ((real 0)) null (explicit-check)) ;;; Even though ANSI defines LISP-IMPLEMENTATION-TYPE and ;;; LISP-IMPLEMENTATION-VERSION to possibly punt and return NIL, we @@ -1398,7 +1418,11 @@ ;;;; magical compiler frobs -(defknown %values-list-or-context (t t t) * (always-translatable)) +(defknown %rest-values (t t t) * (always-translatable)) +(defknown %rest-ref (t t t t) * (always-translatable)) +(defknown %rest-length (t t t) * (always-translatable)) +(defknown %rest-null (t t t t) * (always-translatable)) +(defknown %rest-true (t t t) * (always-translatable)) (defknown %unary-truncate/single-float (single-float) integer (movable foldable flushable)) (defknown %unary-truncate/double-float (double-float) integer (movable foldable flushable)) @@ -1583,6 +1607,11 @@ ()) (defknown style-warn (t &rest t) null ()) +(defknown coerce-to-condition ((or condition symbol string function) + list type-specifier symbol) + condition + (explicit-check)) + (defknown sc-number-or-lose (symbol) sc-number (foldable)) @@ -1594,6 +1623,12 @@ (defknown sb!vm:%write-barrier () (values) ()) (defknown sb!vm:%data-dependency-barrier () (values) ()) +#!+sb-safepoint +;;; Note: This known function does not have an out-of-line definition; +;;; and if such a definition were needed, it would not need to "call" +;;; itself inline, but could be a no-op, because the compiler inserts a +;;; use of the VOP in the function prologue anyway. +(defknown sb!kernel::gc-safepoint () (values) ()) ;;;; atomic ops (defknown %compare-and-swap-svref (simple-vector index t t) t