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

List:       sbcl-commits
Subject:    [Sbcl-commits] master: consistency check for collation hash table
From:       Christophe Rhodes via Sbcl-commits <sbcl-commits () lists ! sourceforge ! net>
Date:       2019-09-28 17:17:37
Message-ID: 1569691057.732587.12971 () sfp-scm-3 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]

The branch "master" has been updated in SBCL:
       via  b6448b5f06991265c6d66f9ff60eb6c5ccd4eba4 (commit)
      from  6b12fc4091dd19c7edaead6ab7c60f9e2a03d018 (commit)

- Log -----------------------------------------------------------------
commit b6448b5f06991265c6d66f9ff60eb6c5ccd4eba4
Author: Christophe Rhodes <csr21@cantab.net>
Date:   Mon Sep 23 08:05:53 2019 +0100

    consistency check for collation hash table
    
    On 64-bit, we use the fact that three codepoints fit in a 63-bit
    fixnum and make the hash table use EQ as the test, rather than EQL.
    But because our fixnums might be smaller (currently 61 bits on ppc64,
    for example), this isn't necessarily a valid optimization.  However,
    the high codepoints in Unicode are private use / unallocated, and do
    not currently show up in any collation tables; add an averral to
    enforce this at build-time.
---
 src/code/target-char.lisp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/code/target-char.lisp b/src/code/target-char.lisp
index 01001b1ac..4f254a219 100644
--- a/src/code/target-char.lisp
+++ b/src/code/target-char.lisp
@@ -211,9 +211,12 @@
                                         (dotimes (i key-length)
                                           (setf (ldb (byte 32 (* i 32)) key) (aref \
info index))  (incf index))
+                                        ;; verify the validity of
+                                        ;; :test 'eq on 64-bit
+                                        #+64-bit (aver (typep (apply \
                #'pack-3-codepoints codepoints) 'fixnum))
                                         (setf (gethash (apply #'pack-3-codepoints \
codepoints) table)  key)))
-                                (assert (= (hash-table-count table) n-entries))
+                                (aver (= (hash-table-count table) n-entries))
                                 table))))
 
                     ,(with-open-file

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


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