X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Ffndb.lisp;h=7297776eac02d8664d74bc7155b7f198b5c0af4d;hb=079ef9dad558ca07cb8178ef428bf738112174fa;hp=2c653e499b5d78e462e363ca05ae3318ad799851;hpb=1d46d379bb7a6424524b978f213ef69be5f1ad69;p=sbcl.git diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 2c653e4..7297776 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -44,7 +44,7 @@ (defknown type-of (t) t (foldable flushable)) ;;; These can be affected by type definitions, so they're not FOLDABLE. -(defknown (upgraded-complex-part-type sb!xc:upgraded-array-element-type) +(defknown (sb!xc:upgraded-complex-part-type sb!xc:upgraded-array-element-type) (type-specifier &optional lexenv-designator) type-specifier (unsafely-flushable)) @@ -340,7 +340,7 @@ (defknown decode-float (float) (values float float-exponent float) (movable foldable flushable explicit-check)) -(defknown scale-float (float float-exponent) float +(defknown scale-float (float integer) float (movable foldable unsafely-flushable explicit-check)) (defknown float-radix (float) float-radix (movable foldable flushable)) @@ -421,7 +421,7 @@ (movable foldable flushable)) (defknown name-char (string-designator) (or character null) (movable foldable flushable)) -(defknown code-char (char-code) base-char +(defknown code-char (char-code) character ;; By suppressing constant folding on CODE-CHAR when the ;; cross-compiler is running in the cross-compilation host vanilla ;; ANSI Common Lisp, we can use CODE-CHAR expressions to delay until @@ -787,7 +787,7 @@ (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) - (foldable flushable)) + (#-sb-xc-host foldable flushable)) ;;;; from the "Arrays" chapter @@ -1058,7 +1058,8 @@ :derive-type #'result-type-first-arg) ;;; xxx-TO-STRING functions are not foldable because they depend on -;;; the dynamic environment. +;;; the dynamic environment, the state of the pretty printer dispatch +;;; table, and probably other run-time factors. (defknown write-to-string (t &key (:escape t) (:radix t) (:base (integer 2 36)) (:readably t) (:circle t) (:pretty t) (:level (or unsigned-byte null)) @@ -1066,7 +1067,7 @@ (:lines (or unsigned-byte null)) (:right-margin (or unsigned-byte null)) (:miser-width (or unsigned-byte null)) (:pprint-dispatch t)) simple-string - (foldable flushable explicit-check)) + (flushable explicit-check)) (defknown (prin1-to-string princ-to-string) (t) simple-string (flushable)) @@ -1191,7 +1192,7 @@ :rename-and-delete :overwrite :append :supersede nil)) (:if-does-not-exist (member :error :create nil)) - (:external-format (member :default))) + (:external-format keyword)) (or stream null)) (defknown rename-file (pathname-designator filename) @@ -1286,7 +1287,7 @@ (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)) +(defknown ed (&optional (or symbol cons filename)) t) (defknown dribble (&optional filename &key (:if-exists t)) (values)) @@ -1342,6 +1343,8 @@ ;;;; miscellaneous extensions (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) @@ -1378,6 +1381,8 @@ (defknown %nlx-entry (t) *) (defknown %%primitive (t t &rest t) *) (defknown %pop-values (t) t) +(defknown %nip-values (t t &rest t) (values)) +(defknown %allocate-closures (t) *) (defknown %type-check-error (t t) nil) ;; FIXME: This function does not return, but due to the implementation @@ -1464,6 +1469,19 @@ (defknown sb!vm::push-word-on-c-stack (system-area-pointer) (values) (unsafe)) (defknown sb!vm::pop-words-from-c-stack (index) (values) ()) +#!+linkage-table +(defknown foreign-symbol-dataref-address (simple-string) + system-area-pointer + (movable flushable)) + +(defknown foreign-symbol-address (simple-string &optional boolean) + system-area-pointer + (movable flushable)) + +(defknown foreign-symbol-address-as-integer (simple-string &optional boolean) + integer + (movable flushable)) + ;;;; miscellaneous internal utilities (defknown %fun-name (function) t (flushable)) @@ -1478,3 +1496,4 @@ (values) ()) (defknown style-warn (string &rest t) null ()) +