From 71d17114e902d5452affc34bf7e7a4cc1bfdfca4 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Mon, 26 May 2008 07:38:28 +0000 Subject: [PATCH] restore non-consingness of WITH-SPINLOCK * Move the STACK-ALLOCATE-VALUE-CELLS declarations to DX-LET, and to the right scope. (Free declaration.) --- src/code/early-extensions.lisp | 4 ++-- src/code/fd-stream.lisp | 8 +++----- src/code/thread.lisp | 7 ------- version.lisp-expr | 2 +- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/code/early-extensions.lisp b/src/code/early-extensions.lisp index d52a0dc0a..a77d82e19 100644 --- a/src/code/early-extensions.lisp +++ b/src/code/early-extensions.lisp @@ -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) diff --git a/src/code/fd-stream.lisp b/src/code/fd-stream.lisp index 1428363c0..4eab347c9 100644 --- a/src/code/fd-stream.lisp +++ b/src/code/fd-stream.lisp @@ -844,11 +844,9 @@ ;;; 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 diff --git a/src/code/thread.lisp b/src/code/thread.lisp index 54092dede..6e6ebecd2 100644 --- a/src/code/thread.lisp +++ b/src/code/thread.lisp @@ -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 diff --git a/version.lisp-expr b/version.lisp-expr index 3ce5ae6be..e4560c140 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 2.11.4.GIT