0.9.2.13:
[sbcl.git] / src / compiler / fndb.lisp
index 309758f..ac59674 100644 (file)
 
 (defknown coerce (t type-specifier) t
   ;; Note:
-  ;; (1) This is not FLUSHABLE because it's defined to signal errors.
-  ;; (2) It's not worth trying to make this FOLDABLE in the
-  ;;     cross-compiler,because
-  ;;       (a) it would probably be really hard to make all the 
-  ;;           tricky issues (e.g. which specialized array types are
-  ;;           supported) match between cross-compiler and target
-  ;;           compiler, and besides
-  ;;       (b) leaving it not FOLDABLE lets us use the idiom
-  ;;              (COERCE FOO 'SOME-SPECIALIZED-ARRAY-TYPE-OR-ANOTHER)
-  ;;          as a way of delaying the generation of specialized
-  ;;          array types until runtime, which helps us keep the
-  ;;          cross-compiler's dumper relatively simple and which
-  ;;          lets us preserve distinctions which might not even exist
-  ;;           on the cross-compilation host (because ANSI doesn't
-  ;;          guarantee that specialized array types exist there).
-  ;; FIXME: It's actually not clear that COERCE on non-NUMBER types
-  ;; is FOLDABLE at all. Check this.
-  (movable #-sb-xc-host foldable)
+  ;; This is not FLUSHABLE because it's defined to signal errors.
+  (movable)
   ;; :DERIVE-TYPE RESULT-TYPE-SPEC-NTH-ARG 2 ? Nope... (COERCE 1 'COMPLEX)
   ;; returns REAL/INTEGER, not COMPLEX.
   )
@@ -44,7 +28,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))
 \f
                   bit-orc1 bit-orc2)
   ((array bit) (array bit) &optional (or (array bit) (member t nil)))
   (array bit)
-  (foldable)
+  ()
   #|:derive-type #'result-type-last-arg|#)
 
 (defknown bit-not ((array bit) &optional (or (array bit) (member t nil)))
   (array bit)
-  (foldable)
+  ()
   #|:derive-type #'result-type-last-arg|#)
 
 (defknown bit-vector-= (bit-vector bit-vector) boolean
    (:verbose t)
    (:print t)
    (:if-does-not-exist (member :error :create nil))
-   (:external-format (member :default)))
+   (:external-format keyword))
   t)
 
 (defknown directory (pathname-designator &key)
   (values (or function symbol cons) boolean boolean))
 
 (defknown compile-file
-  (filename
+  (pathname-designator
    &key
 
    ;; ANSI options
-   (:output-file (or filename
+   (:output-file (or pathname-designator
                     null
                     ;; FIXME: This last case is a non-ANSI hack.
                     (member t)))
    (:verbose t)
    (:print t)
-   (:external-format t)
+   (:external-format keyword)
 
    ;; extensions
    (:trace-file t)
 ;;;; 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)
 (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
   (movable flushable))
 
 (defknown foreign-symbol-address-as-integer (simple-string &optional boolean)
-  integer
+  (values integer boolean)
   (movable flushable))
 
 ;;;; miscellaneous internal utilities