X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ffndb.lisp;h=fe73ff01cb443a0b8b894098079ea13e9bded037;hb=670d28c10c178142146f6916c5fa0967732f3a8f;hp=2641b48e154ba0be96198c2654091b5f1c3d226c;hpb=43caa89c20c70fdef77797fe31e6fd09bfcf2527;p=sbcl.git diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 2641b48..fe73ff0 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -164,6 +164,7 @@ (defknown get-properties (list list) (values t t list) (foldable flushable)) (defknown symbol-name (symbol) simple-string (movable foldable flushable)) (defknown make-symbol (string) symbol (flushable)) +(defknown %make-symbol (simple-string) symbol (flushable)) (defknown copy-symbol (symbol &optional t) symbol (flushable)) (defknown gensym (&optional (or string unsigned-byte)) symbol ()) (defknown symbol-package (symbol) (or sb!xc:package null) (flushable)) @@ -433,7 +434,7 @@ (defknown reverse (sequence) consed-sequence (flushable) :derive-type (sequence-result-nth-arg 1)) -(defknown nreverse (sequence) sequence () +(defknown nreverse (sequence) sequence (important-result) :derive-type #'result-type-first-arg :destroyed-constant-args (nth-constant-nonempty-sequence-args 1)) @@ -537,7 +538,7 @@ (:test-not callable) (:start index) (:end sequence-end) (:count sequence-count) (:key callable)) sequence - (flushable call) + (flushable call important-result) :derive-type (sequence-result-nth-arg 2) :destroyed-constant-args (nth-constant-nonempty-sequence-args 2)) @@ -554,7 +555,7 @@ (callable sequence &key (:from-end t) (:start index) (:end sequence-end) (:count sequence-count) (:key callable)) sequence - (flushable call) + (flushable call important-result) :derive-type (sequence-result-nth-arg 2) :destroyed-constant-args (nth-constant-nonempty-sequence-args 2)) @@ -577,7 +578,7 @@ (sequence &key (:test callable) (:test-not callable) (:start index) (:from-end t) (:end sequence-end) (:key callable)) sequence - (unsafely-flushable call) + (unsafely-flushable call important-result) :derive-type (sequence-result-nth-arg 1) :destroyed-constant-args (nth-constant-nonempty-sequence-args 1)) @@ -630,6 +631,9 @@ (call) :derive-type (sequence-result-nth-arg 1) :destroyed-constant-args (nth-constant-nonempty-sequence-args 1)) +(defknown sb!impl::stable-sort-list (list function function) list + (call important-result) + :destroyed-constant-args (nth-constant-nonempty-sequence-args 1)) (defknown sb!impl::sort-vector (vector index index function (or function null)) * ; SORT-VECTOR works through side-effect (call) @@ -638,7 +642,7 @@ (defknown merge (type-specifier sequence sequence callable &key (:key callable)) sequence - (call) + (call important-result) :derive-type (creation-result-type-specifier-nth-arg 1) :destroyed-constant-args (nth-constant-nonempty-sequence-args 2 3)) @@ -708,7 +712,7 @@ (defknown sb!impl::nconc2 (list t) t () :destroyed-constant-args (remove-non-constants-and-nils #'butlast)) -(defknown nreconc (list t) t () +(defknown nreconc (list t) t (important-result) :destroyed-constant-args (nth-constant-nonempty-sequence-args 1)) (defknown butlast (list &optional unsigned-byte) list (flushable)) (defknown nbutlast (list &optional unsigned-byte) list () @@ -762,7 +766,7 @@ (defknown (nunion nintersection nset-difference nset-exclusive-or) (list list &key (:key callable) (:test callable) (:test-not callable)) list - (foldable flushable call) + (foldable flushable call important-result) :destroyed-constant-args (nth-constant-nonempty-sequence-args 1 2)) (defknown subsetp @@ -789,7 +793,7 @@ (&key (:test callable) (:size unsigned-byte) (:rehash-size (or (integer 1) (float (1.0)))) (:rehash-threshold (real 0 1)) - (:weak-p t)) + (:weakness (member nil :key :value :key-and-value :key-or-value))) hash-table (flushable unsafe)) (defknown hash-table-p (t) boolean (movable foldable flushable)) @@ -877,6 +881,8 @@ :destroyed-constant-args (nth-constant-args 1)) ;;; FIXME: complicated :DESTROYED-CONSTANT-ARGS +;;; Also, an important-result warning could be provided if the array +;;; is known to be not expressly adjustable. (defknown adjust-array (array (or index list) &key (:element-type type-specifier) (:initial-element t) (:initial-contents t) @@ -975,7 +981,7 @@ (defknown readtablep (t) boolean (movable foldable flushable)) (defknown set-syntax-from-char - (character character &optional (or readtable null) readtable) (eql t) + (character character &optional readtable (or readtable null)) (eql t) ()) (defknown set-macro-character (character callable &optional t readtable) @@ -1159,7 +1165,7 @@ (defknown load-logical-pathname-translations (string) t ()) (defknown logical-pathname-translations (logical-host-designator) list ()) -(defknown pathname (pathname-designator) pathname (unsafely-flushable)) +(defknown pathname (pathname-designator) pathname ()) (defknown truename (pathname-designator) pathname ()) (defknown parse-namestring @@ -1176,7 +1182,7 @@ (defknown merge-pathnames (pathname-designator &optional pathname-designator pathname-version) pathname - (unsafely-flushable)) + ()) (defknown make-pathname (&key (:defaults pathname-designator) @@ -1402,6 +1408,8 @@ (defknown %listify-rest-args (t index) list (flushable)) (defknown %more-arg-context (t t) (values t index) (flushable)) (defknown %more-arg (t index) t) +#!+stack-grows-downward-not-upward +(defknown %more-kw-arg (t index) (values t t)) (defknown %more-arg-values (t index index) * (flushable)) (defknown %verify-arg-count (index index) (values)) (defknown %arg-count-error (t) nil) @@ -1432,8 +1440,9 @@ (defknown %negate (number) number (movable foldable flushable explicit-check)) (defknown %check-bound (array index fixnum) index (movable foldable flushable)) (defknown data-vector-ref (simple-array index) t - (foldable explicit-check)) -(defknown data-vector-set (array index t) t (unsafe explicit-check)) + (foldable explicit-check always-translatable)) +(defknown data-vector-set (array index t) t + (unsafe explicit-check always-translatable)) (defknown hairy-data-vector-ref (array index) t (foldable explicit-check)) (defknown hairy-data-vector-set (array index t) t (unsafe explicit-check)) @@ -1540,4 +1549,3 @@ (values) ()) (defknown style-warn (string &rest t) null ()) -