master: Tidy up the definition of *FINITE-SBS*

snuglas via Sbcl-commits <[email protected]>
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  9190402f7088f04df927851e8a345400c6366cc7 (commit)
      from  87930f9417b8c88c5fdc36595837ba577fb4e533 (commit)

- Log -----------------------------------------------------------------
commit 9190402f7088f04df927851e8a345400c6366cc7
Author: Douglas Katzman <[email protected]>
Date:   Thu Apr 9 18:53:36 2026 -0400

    Tidy up the definition of *FINITE-SBS*
    
    Another thing which pre-dated DEFINE-THREAD-LOCAL
---
 src/compiler/vop.lisp | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/compiler/vop.lisp b/src/compiler/vop.lisp
index e67886370..aeca73d7b 100644
--- a/src/compiler/vop.lisp
+++ b/src/compiler/vop.lisp
@@ -870,18 +870,11 @@
   (wired-map 0 :type sb-vm:finite-sc-offset-map))
 (declaim (freeze-type storage-base finite-sb-template finite-sb))
 
-;;; Give this a toplevel value so that it can be declaimed ALWAYS-BOUND.
-;;; The compiler will never look at the toplevel value though.
-(defvar *finite-sbs*
-  #-sb-xc-host
-  (make-array #.(count :non-packed *backend-sbs* :key #'sb-kind :test #'neq)
-              :initial-element (make-unbound-marker)))
-#-sb-xc-host
-(progn
-  (declaim (type (simple-vector #.(length *finite-sbs*)) *finite-sbs*)
-           (always-bound *finite-sbs*))
-  (eval-when (:compile-toplevel :load-toplevel :execute)
-    (setf (info :variable :wired-tls '*finite-sbs*) :always-thread-local)))
+;;; Give this a per-thread initial value so that it can be declaimed ALWAYS-BOUND.
+;;; The compiler will never see that value. It does not have to be type-correct,
+;;; and in fact unbound-marker works.
+(sb-impl:define-thread-local *finite-sbs* (make-unbound-marker))
+#-sb-xc-host (declaim (type (simple-vector #.(length *finite-sbs*)) *finite-sbs*))
 
 ;;; All these are SETFable
 (defmacro finite-sb-current-size (sb)

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.