Update of /cvsroot/sbcl/sbcl/src/pcl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21922/src/pcl
Modified Files:
cache.lisp dfun.lisp
Log Message:
0.9.12.3:
Make all internals calls to RANDOM use their own random states instead
of *RANDOM-STATE*.
Index: cache.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/pcl/cache.lisp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- cache.lisp 20 Apr 2006 14:25:45 -0000 1.38
+++ cache.lisp 27 Apr 2006 15:56:50 -0000 1.39
@@ -1160,6 +1160,8 @@
(do-one-fill wrappers value))
(maybe-check-cache ncache)))))
+(defvar *pcl-misc-random-state* (make-random-state))
+
;;; This is the heart of the cache filling mechanism. It implements
;;; the decisions about where entries are placed.
;;;
@@ -1196,7 +1198,8 @@
(when (>= osep limit)
(return-from find-free-cache-line (values primary nil)))
(when (cond ((= nsep limit) t)
- ((= nsep osep) (zerop (random 2)))
+ ((= nsep osep)
+ (zerop (random 2 *pcl-misc-random-state*)))
((> nsep osep) t)
(t nil))
;; See whether we can displace what is in this line so that we
Index: dfun.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/pcl/dfun.lisp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- dfun.lisp 16 Mar 2006 18:57:18 -0000 1.46
+++ dfun.lisp 27 Apr 2006 15:56:50 -0000 1.47
@@ -987,7 +987,8 @@
;; which are the parameters of the new state, and get other
;; information from the lexical variables bound above.
(flet ((two-class (index w0 w1)
- (when (zerop (random 2)) (psetf w0 w1 w1 w0))
+ (when (zerop (random 2 *pcl-misc-random-state*))
+ (psetf w0 w1 w1 w0))
(dfun-update gf
#'make-two-class-accessor-dfun
ntype
|