Optimize make-array for unknown dimensions.
[sbcl.git] / src / compiler / fndb.lisp
index 86fe96d..f3a08f0 100644 (file)
 ;;;; from the "Symbols" chapter:
 
 (defknown get (symbol t &optional t) t (flushable))
-(defknown sb!impl::get2 (symbol t) t (flushable))
 (defknown sb!impl::get3 (symbol t t) t (flushable))
 (defknown remprop (symbol t) t)
 (defknown symbol-plist (symbol) list (flushable))
   ()
   :derive-type (creation-result-type-specifier-nth-arg 1))
 
+(defknown %concatenate-to-string (&rest sequence) simple-string
+  (explicit-check flushable))
+(defknown %concatenate-to-base-string (&rest sequence) simple-base-string
+  (explicit-check flushable))
+
 (defknown (map %map) (type-specifier callable sequence &rest sequence)
   consed-sequence
   (call)
 (defknown hash-table-p (t) boolean (movable foldable flushable))
 (defknown gethash (t hash-table &optional t) (values t boolean)
   (flushable)) ; not FOLDABLE, since hash table contents can change
-(defknown sb!impl::gethash2 (t hash-table) (values t boolean)
-  (flushable)) ; not FOLDABLE, since hash table contents can change
 (defknown sb!impl::gethash3 (t hash-table t) (values t boolean)
   (flushable)) ; not FOLDABLE, since hash table contents can change
 (defknown %puthash (t hash-table t) t ()
                       (:fill-pointer t)
                       (:displaced-to (or array null))
                       (:displaced-index-offset index))
-  array (flushable))
+  array (flushable explicit-check))
+
+(defknown %make-array ((or index list)
+                       (unsigned-byte #.sb!vm:n-widetag-bits)
+                       (unsigned-byte 16)
+                       &key
+                       (:element-type type-specifier)
+                       (:initial-element t)
+                       (:initial-contents t)
+                       (:adjustable t)
+                       (:fill-pointer t)
+                       (:displaced-to (or array null))
+                       (:displaced-index-offset index))
+    array (flushable))
 
 (defknown vector (&rest t) simple-vector (flushable))
 
   (movable flushable explicit-check))
 (defknown %instance-typep (t (or type-specifier ctype)) boolean
   (movable flushable explicit-check always-translatable))
+;;; We should never emit a call to %typep-wrapper
+(defknown %typep-wrapper (t t (or type-specifier ctype)) t
+  (movable flushable always-translatable))
 
 (defknown %cleanup-point () t)
 (defknown %special-bind (t t) t)