0.9.5.17:
authorJuho Snellman <jsnell@iki.fi>
Sun, 2 Oct 2005 00:32:00 +0000 (00:32 +0000)
committerJuho Snellman <jsnell@iki.fi>
Sun, 2 Oct 2005 00:32:00 +0000 (00:32 +0000)
SB-SPROF:ADJUST-SAMPLES-FOR-ADDRESS-CHANGES was consing excessively,
        sometimes resulting in an endless cycle of GC / run the
        adjusting in a *AFTER-GC-HOOK* / GC / etc. (Reported by David
        Lichteblau)

        * Declare the &REST arguments of numeric comparison operators
          as DYNAMIC-EXTENT. At least I was surprised by (SORT ... #'>)
          consing.
        * Clear *DYNAMIC-SPACE-CODE-INFO* every time RECORD-DYNINFO is
          called (significant for multiple profiling runs without
          intervening RESETs)

NEWS
contrib/sb-sprof/sb-sprof.lisp
src/code/numbers.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 63aa706..00ef33b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ changes in sbcl-0.9.6 relative to sbcl-0.9.5:
     (thanks to Svein Ove Aas)
   * bug fix: Unicode symbols are correctly printed in LDB backtraces
     (thanks to David Lichteblau)
+  * optimization: non-open coded uses of numeric comparison operators
+    (e.g. >) no longer cons when called with more than one parameter
+    on platforms supporting dynamic-extent allocation.
   * enhancement: saving cores with foreign code loaded is now supported
     on MIPS/Linux in addition to the previously supported platforms.
 
index 0fc7423..5d6a32b 100644 (file)
 ;;; Record the addresses of dynamic-space code objects in
 ;;; *DYNAMIC-SPACE-CODE-INFO*.  Call this with GC disabled.
 (defun record-dyninfo ()
+  (setf *dynamic-space-code-info* nil)
   (flet ((record-address (code size)
            (declare (ignore size))
            (multiple-value-bind (start end)
index a0fff99..caafd1b 100644 (file)
 (defun = (number &rest more-numbers)
   #!+sb-doc
   "Return T if all of its arguments are numerically equal, NIL otherwise."
+  (declare (dynamic-extent more-numbers))
   (the number number)
   (do ((nlist more-numbers (cdr nlist)))
       ((atom nlist) t)
 (defun /= (number &rest more-numbers)
   #!+sb-doc
   "Return T if no two of its arguments are numerically equal, NIL otherwise."
+  (declare (dynamic-extent more-numbers))
   (do* ((head (the number number) (car nlist))
         (nlist more-numbers (cdr nlist)))
        ((atom nlist) t)
 (defun < (number &rest more-numbers)
   #!+sb-doc
   "Return T if its arguments are in strictly increasing order, NIL otherwise."
+  (declare (dynamic-extent more-numbers))
   (do* ((n (the number number) (car nlist))
         (nlist more-numbers (cdr nlist)))
        ((atom nlist) t)
 (defun > (number &rest more-numbers)
   #!+sb-doc
   "Return T if its arguments are in strictly decreasing order, NIL otherwise."
+  (declare (dynamic-extent more-numbers))
   (do* ((n (the number number) (car nlist))
         (nlist more-numbers (cdr nlist)))
        ((atom nlist) t)
 (defun <= (number &rest more-numbers)
   #!+sb-doc
   "Return T if arguments are in strictly non-decreasing order, NIL otherwise."
+  (declare (dynamic-extent more-numbers))
   (do* ((n (the number number) (car nlist))
         (nlist more-numbers (cdr nlist)))
        ((atom nlist) t)
 (defun >= (number &rest more-numbers)
   #!+sb-doc
   "Return T if arguments are in strictly non-increasing order, NIL otherwise."
+  (declare (dynamic-extent more-numbers))
   (do* ((n (the number number) (car nlist))
         (nlist more-numbers (cdr nlist)))
        ((atom nlist) t)
   #!+sb-doc
   "Return the greatest of its arguments; among EQUALP greatest, return
 the first."
+  (declare (dynamic-extent more-numbers))
   (do ((nlist more-numbers (cdr nlist))
        (result number))
       ((null nlist) (return result))
@@ -812,6 +819,7 @@ the first."
   #!+sb-doc
   "Return the least of its arguments; among EQUALP least, return
 the first."
+  (declare (dynamic-extent more-numbers))
   (do ((nlist more-numbers (cdr nlist))
        (result number))
       ((null nlist) (return result))
index 0877902..d521fc7 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".)
-"0.9.5.16"
+"0.9.5.17"