projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.19.20: fast CLRHASH on empty hash-tables
[sbcl.git]
/
tests
/
dynamic-extent.impure.lisp
diff --git
a/tests/dynamic-extent.impure.lisp
b/tests/dynamic-extent.impure.lisp
index
df9bf95
..
685ff6d
100644
(file)
--- a/
tests/dynamic-extent.impure.lisp
+++ b/
tests/dynamic-extent.impure.lisp
@@
-14,13
+14,12
@@
(when (eq sb-ext:*evaluator-mode* :interpret)
(sb-ext:quit :unix-status 104))
(when (eq sb-ext:*evaluator-mode* :interpret)
(sb-ext:quit :unix-status 104))
-(setq sb-c::*check-consistency* t)
+(setq sb-c::*check-consistency* t
+ sb-ext:*stack-allocate-dynamic-extent* t)
(defmacro defun-with-dx (name arglist &body body)
(defmacro defun-with-dx (name arglist &body body)
- `(locally
- (declare (optimize sb-c::stack-allocate-dynamic-extent))
- (defun ,name ,arglist
- ,@body)))
+ `(defun ,name ,arglist
+ ,@body))
(declaim (notinline opaque-identity))
(defun opaque-identity (x)
(declaim (notinline opaque-identity))
(defun opaque-identity (x)
@@
-129,11
+128,10
@@
;;; value-cells
(defun-with-dx dx-value-cell (x)
;;; value-cells
(defun-with-dx dx-value-cell (x)
- (declare (optimize sb-c::stack-allocate-value-cells))
;; Not implemented everywhere, yet.
#+(or x86 x86-64 mips)
(let ((cell x))
;; Not implemented everywhere, yet.
#+(or x86 x86-64 mips)
(let ((cell x))
- (declare (dynamic-extent cell))
+ (declare (sb-int:truly-dynamic-extent cell))
(flet ((f ()
(incf cell)))
(declare (dynamic-extent #'f))
(flet ((f ()
(incf cell)))
(declare (dynamic-extent #'f))
@@
-385,7
+383,8
@@
;;; handler-case and handler-bind should use DX internally
(defun dx-handler-bind (x)
;;; handler-case and handler-bind should use DX internally
(defun dx-handler-bind (x)
- (handler-bind ((error (lambda (c) (break "OOPS: ~S caused ~S" x c)))
+ (handler-bind ((error
+ (lambda (c) (break "OOPS: ~S caused ~S" x c)))
((and serious-condition (not error))
#'(lambda (c) (break "OOPS2: ~S did ~S" x c))))
(/ 2 x)))
((and serious-condition (not error))
#'(lambda (c) (break "OOPS2: ~S did ~S" x c))))
(/ 2 x)))
@@
-397,7
+396,7
@@
(:no-error (res)
(1- res))))))
(:no-error (res)
(1- res))))))
-;;; with-spinlock should use DX and not cons
+;;; with-spinlock and with-mutex should use DX and not cons
(defvar *slock* (sb-thread::make-spinlock :name "slocklock"))
(defvar *slock* (sb-thread::make-spinlock :name "slocklock"))
@@
-405,6
+404,12
@@
(sb-thread::with-spinlock (*slock*)
(true *slock*)))
(sb-thread::with-spinlock (*slock*)
(true *slock*)))
+(defvar *mutex* (sb-thread::make-mutex :name "mutexlock"))
+
+(defun test-mutex ()
+ (sb-thread:with-mutex (*mutex*)
+ (true *mutex*)))
+
;;; not really DX, but GETHASH and (SETF GETHASH) should not cons
(defvar *table* (make-hash-table))
;;; not really DX, but GETHASH and (SETF GETHASH) should not cons
(defvar *table* (make-hash-table))
@@
-466,7
+471,9
@@
;; Not strictly DX..
(assert-no-consing (test-hash-table))
#+sb-thread
;; Not strictly DX..
(assert-no-consing (test-hash-table))
#+sb-thread
- (assert-no-consing (test-spinlock)))
+ (progn
+ (assert-no-consing (test-spinlock))
+ (assert-no-consing (test-mutex))))
\f
;;; Bugs found by Paul F. Dietz
\f
;;; Bugs found by Paul F. Dietz