X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Ffndb.lisp;h=7b433e36fd00681cf2f419f3e15267813900c0be;hb=2963d6858d147b23c33f38e051e61264b479c9fc;hp=6439b1991fcdbb5bfa3d36320b4a725dd0e82553;hpb=2f453e77acd12b73a09c3b50601a420d3454b732;p=sbcl.git diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 6439b19..7b433e3 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)) @@ -756,7 +756,7 @@ (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!vm:*target-most-positive-fixnum*) +(defknown sxhash (t) (integer 0 #.sb!xc:most-positive-fixnum) (foldable flushable)) ;;;; from the "Arrays" chapter @@ -922,8 +922,8 @@ (character character callable &optional readtable) function (unsafe)) (defknown get-dispatch-macro-character - (character character &optional (or readtable null)) callable - (flushable)) + (character character &optional (or readtable null)) (or callable null) + ()) ;;; may return any type due to eof-value... (defknown (read read-preserving-whitespace read-char-no-hang read-char) @@ -1145,10 +1145,13 @@ ;;;; from the "Errors" chapter: -(defknown error (t &rest t) nil) ; never returns... +(defknown error (t &rest t) nil) ; never returns (defknown cerror (string t &rest t) null) (defknown warn (t &rest t) null) (defknown break (&optional t &rest t) null) + +;;; and analogous SBCL extension: +(defknown bug (t &rest t) nil) ; never returns ;;;; from the "Miscellaneous" Chapter: @@ -1170,8 +1173,7 @@ ;; extensions (:trace-file t) - (:block-compile t) - (:byte-compile (member t nil :maybe))) + (:block-compile t)) (values (or pathname null) boolean boolean)) (defknown disassemble (callable &key @@ -1266,8 +1268,8 @@ (defknown %more-arg-context (t t) (values t index) (flushable)) (defknown %more-arg (t index) t) (defknown %more-arg-values (t index index) * (flushable)) -(defknown %verify-argument-count (index index) (values)) -(defknown %argument-count-error (t) nil) +(defknown %verify-arg-count (index index) (values)) +(defknown %arg-count-error (t) nil) (defknown %unknown-values () *) (defknown %catch (t t) t) (defknown %unwind-protect (t t) t) @@ -1279,8 +1281,8 @@ (defknown %%primitive (t t &rest t) *) (defknown %pop-values (t) t) (defknown %type-check-error (t t) nil) -(defknown %odd-key-arguments-error () nil) -(defknown %unknown-key-argument-error (t) nil) +(defknown %odd-key-args-error () nil) +(defknown %unknown-key-arg-error (t) nil) (defknown (%ldb %mask-field) (bit-index bit-index integer) unsigned-byte (movable foldable flushable explicit-check)) (defknown (%dpb %deposit-field) (integer bit-index bit-index integer) integer @@ -1298,18 +1300,19 @@ (values (simple-array * (*)) index index index) (foldable 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 %coerce-name-to-fun ((or symbol cons)) function (flushable)) +(defknown %coerce-callable-to-fun (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 %find-position-if-not) + (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 -;;; describing the actual function called. -;;; -;;; FIXME: It would be nice to make structure slot accessors be -;;; ordinary functions. -(defknown %slot-accessor (t) t (flushable)) -(defknown %slot-setter (t t) t (unsafe)) +(defknown sb!kernel::arg-count-error (t t t t t t) nil (unsafe)) ;;;; SETF inverses @@ -1325,10 +1328,15 @@ (defknown %charset (string index character) character (unsafe)) (defknown %scharset (simple-string index character) character (unsafe)) (defknown %set-symbol-value (symbol t) t (unsafe)) -(defknown fset (symbol function) function (unsafe)) +(defknown (setf symbol-function) (function symbol) function (unsafe)) (defknown %set-symbol-plist (symbol t) t (unsafe)) (defknown (setf fdocumentation) ((or string null) t symbol) (or string null) ()) (defknown %setnth (index list t) t (unsafe)) (defknown %set-fill-pointer (vector index) index (unsafe)) + +;;;; miscellaneous internal utilities + +(defknown %fun-name (function) t (flushable)) +(defknown (setf %fun-name) (t function) t (unsafe))