restore non-consingness of WITH-SPINLOCK
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 26 May 2008 07:38:28 +0000 (07:38 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 26 May 2008 07:38:28 +0000 (07:38 +0000)
 * Move the STACK-ALLOCATE-VALUE-CELLS declarations to DX-LET, and to
   the right scope. (Free declaration.)

src/code/early-extensions.lisp
src/code/fd-stream.lisp
src/code/thread.lisp
version.lisp-expr

index d52a0dc..a77d82e 100644 (file)
@@ -1254,8 +1254,8 @@ to :INTERPRET, an interpreter will be used.")
 ;;; so take care with this one...
 (defmacro dx-let (bindings &body forms)
   `(locally
-       #-sb-xc-host
-       (declare (optimize sb!c::stack-allocate-dynamic-extent))
+       (declare (optimize #-sb-xc-host sb!c::stack-allocate-dynamic-extent
+                          #-sb-xc-host sb!c::stack-allocate-value-cells))
      (let ,bindings
        (declare (dynamic-extent ,@(mapcar (lambda (bind)
                                             (if (consp bind)
index 1428363..4eab347 100644 (file)
 ;;; then fill the input buffer, and return the number of bytes read. Throws
 ;;; to EOF-INPUT-CATCHER if the eof was reached.
 (defun refill-input-buffer (stream)
-  (let ((fd (fd-stream-fd stream))
-        (errno 0)
-        (count 0))
-    (declare (optimize sb!c::stack-allocate-value-cells)
-             (dynamic-extent fd errno count))
+  (dx-let ((fd (fd-stream-fd stream))
+           (errno 0)
+           (count 0))
     (tagbody
        ;; Check for blocking input before touching the stream, as if
        ;; we happen to wait we are liable to be interrupted, and the
index 54092de..6e6ebec 100644 (file)
@@ -159,7 +159,6 @@ provided the default value is used for the mutex."
                   (declare (function function))
                   (flet ((%call-with-system-mutex ()
                            (dx-let (got-it)
-                             #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
                              (unwind-protect
                                   (when (setf got-it (get-mutex mutex))
                                     (funcall function))
@@ -181,7 +180,6 @@ provided the default value is used for the mutex."
     (declare (function function))
     (without-interrupts
       (dx-let (got-it)
-        #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
         (unwind-protect
              (when (setf got-it (get-spinlock spinlock))
                (funcall function))
@@ -194,7 +192,6 @@ provided the default value is used for the mutex."
                   (flet ((%call-with-system-spinlock ()
                            (dx-let ((inner-lock-p (eq *current-thread* (spinlock-value spinlock)))
                                     (got-it nil))
-                             #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
                              (unwind-protect
                                   (when (or inner-lock-p (setf got-it (get-spinlock spinlock)))
                                     (funcall function))
@@ -212,7 +209,6 @@ provided the default value is used for the mutex."
   (defun call-with-spinlock (function spinlock)
     (declare (function function))
     (dx-let ((got-it nil))
-      #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
       (without-interrupts
         (unwind-protect
              (when (setf got-it (allow-with-interrupts
@@ -224,7 +220,6 @@ provided the default value is used for the mutex."
   (defun call-with-mutex (function mutex value waitp)
     (declare (function function))
     (dx-let ((got-it nil))
-      #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
       (without-interrupts
         (unwind-protect
              (when (setq got-it (allow-with-interrupts
@@ -237,7 +232,6 @@ provided the default value is used for the mutex."
     (declare (function function))
     (dx-let ((inner-lock-p (eq (mutex-%owner mutex) *current-thread*))
              (got-it nil))
-      #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
       (without-interrupts
         (unwind-protect
              (when (or inner-lock-p (setf got-it (allow-with-interrupts
@@ -252,7 +246,6 @@ provided the default value is used for the mutex."
     (declare (function function))
     (dx-let ((inner-lock-p (eq (spinlock-value spinlock) *current-thread*))
           (got-it nil))
-      #-sb-xc-host (declare (optimize sb!c::stack-allocate-value-cells))
       (without-interrupts
         (unwind-protect
              (when (or inner-lock-p (setf got-it (allow-with-interrupts
index 3ce5ae6..e4560c1 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.16.44"
+"1.0.16.45"