[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-commits
Subject:    [Sbcl-commits] master: Fix build for non-SBCL hosts
From:       Douglas Katzman via Sbcl-commits <sbcl-commits () lists ! sourceforge ! net>
Date:       2020-05-21 4:13:04
Message-ID: 1590034385.283319.14329 () sfp-scm-2 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]

The branch "master" has been updated in SBCL:
       via  e80f2b9abd8788f20e17eae5d75a9220b7c58030 (commit)
      from  4d41b09bf6210c7750f57dd4fbd7df48b47518bd (commit)

- Log -----------------------------------------------------------------
commit e80f2b9abd8788f20e17eae5d75a9220b7c58030
Author: Douglas Katzman <dougk@google.com>
Date:   Thu May 21 00:11:55 2020 -0400

    Fix build for non-SBCL hosts
---
 src/code/target-hash-table.lisp | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/code/target-hash-table.lisp b/src/code/target-hash-table.lisp
index f90d7fce9..9707186f3 100644
--- a/src/code/target-hash-table.lisp
+++ b/src/code/target-hash-table.lisp
@@ -133,9 +133,17 @@
           (sb-vm:is-lisp-pointer (get-lisp-obj-address key))))
 
 (declaim (inline eql-hash eql-hash-no-memoize))
-(macrolet
-    ((define-eql-hash (name symbol-hash-fun)
-       `(defun ,name (key)
+#.`(progn ; our usual whacky incantation because of macrolet + inline
+    ,@(loop
+        for (name symbol-hash-fun)
+        in '((eql-hash sxhash) ; via transform
+             ;; For GETHASH we never compute a symbol-hash. If PUTHASH
+             ;; (or other) hasn't done it, the lookup will fail anyway.
+             ;; Also, the backend can at its discretion avoid clearing
+             ;; the low bits of the hash which is a known fixnum.
+             (eql-hash-no-memoize symbol-hash))
+        collect
+        `(defun ,name (key)
           (declare (values fixnum (member t nil)))
           (if (%other-pointer-subtype-p
                key
@@ -162,12 +170,6 @@
                       nil)
               ;; Consider picking off %INSTANCEP too before using EQ-HASH ?
               (eq-hash key)))))
-  (define-eql-hash eql-hash sxhash) ; via transform
-  ;; For GETHASH we should never compute a symbol-hash. If it hasn't been
-  ;; computed, KEY won't be found, and it doesn't matter what the hash is.
-  ;; This could theoretically avoid clearing the fixnum tag since the symbol
-  ;; is not n.
-  (define-eql-hash eql-hash-no-memoize symbol-hash))
 
 #-sb-fluid (declaim (inline equal-hash))
 (defun equal-hash (key)

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


hooks/post-receive
-- 
SBCL


_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic