1.0.26.20: tighter VECTOR-PUSH-EXTEND argument type
authorChristophe Rhodes <csr21@cantab.net>
Mon, 23 Mar 2009 11:59:48 +0000 (11:59 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Mon, 23 Mar 2009 11:59:48 +0000 (11:59 +0000)
The optional extension parameter must be a positive integer.
... declare this in fndb;
... fix the erroneous use in constraints (not only ensuring
positivity, but also it's an extension not a new-length
parameter).
Issue brought to light by Peter Graves' XCL.

src/compiler/constraint.lisp
src/compiler/fndb.lisp
version.lisp-expr

index de2beec..e087eaf 100644 (file)
       (let ((new (make-constraint (length *constraint-universe*)
                                   kind x y not-p)))
         (vector-push-extend new *constraint-universe*
-                            (* 2 (length *constraint-universe*)))
+                            (1+ (length *constraint-universe*)))
         (conset-adjoin new (lambda-var-constraints x))
         (when (lambda-var-p y)
           (conset-adjoin new (lambda-var-constraints y)))
index a814990..6fb5eb8 100644 (file)
 (defknown fill-pointer (vector) index (foldable unsafely-flushable))
 (defknown vector-push (t vector) (or index null) ()
   :destroyed-constant-args (nth-constant-args 2))
-(defknown vector-push-extend (t vector &optional index) index ()
+(defknown vector-push-extend (t vector &optional (and index (integer 1)))
+  index ()
   :destroyed-constant-args (nth-constant-args 2))
 (defknown vector-pop (vector) t ()
   :destroyed-constant-args (nth-constant-args 1))
index f401656..352ec8a 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.26.19"
+"1.0.26.20"