Changeset 15269
- Timestamp:
- Mar 22, 2012, 5:53:21 PM (13 years ago)
- Location:
- trunk/source
- Files:
-
- 2 edited
-
level-0/l0-hash.lisp (modified) (1 diff)
-
lib/compile-ccl.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-0/l0-hash.lisp
r15264 r15269 145 145 (setf (nhash.vector.flags vector) (logior (ash 1 $nhash_key_moved_bit) flags))))) 146 146 147 #+32-bit-target 147 ;;; 148 ;;; This is a fairly straightforward translation of the "one-at-a-time" 149 ;;; hash function described at: 150 ;;; http://www.burtleburtle.net/bob/hash/doobs.html 151 ;;; 148 152 (defun mixup-hash-code (fixnum) 149 (declare (fixnum fixnum)) 150 #+mixup-hash-code-nop 151 fixnum 152 #-mixup-hash-code-nop 153 (the fixnum 154 (+ fixnum 155 (the fixnum (%ilsl (- 32 8) 156 (logand (1- (ash 1 (- 8 3))) fixnum)))))) 157 158 #+64-bit-target 159 (defun mixup-hash-code (fixnum) 160 (declare (fixnum fixnum)) 161 #+mixup-hash-code-nop 162 fixnum 163 #-mixup-hash-code-nop 164 (the fixnum 165 (+ fixnum 166 (the fixnum (%ilsl 50 167 (logand (1- (ash 1 (- 8 3))) fixnum)))))) 168 169 153 (declare (fixnum fixnum) 154 (optimize (speed 3) (safety 0))) 155 (setq fixnum (logand fixnum target::most-positive-fixnum)) 156 (do* ((hash 0)) 157 ((zerop fixnum) 158 (setq hash (+ hash (the fixnum (ash hash 3))) 159 hash (logxor hash (the fixnum (ash hash -11)))) 160 (the fixnum (+ hash (the fixnum (ash hash 15))))) 161 (declare (fixnum hash)) 162 (setq hash (+ hash (the fixnum (logand fixnum #xff))) 163 fixnum (ash fixnum -8) 164 hash (+ hash (the fixnum (ash hash 10))) 165 hash (logxor hash (the fixnum (ash hash -6)))))) 166 170 167 (defun rotate-hash-code (fixnum) 171 168 (declare (fixnum fixnum)) -
trunk/source/lib/compile-ccl.lisp
r15264 r15269 576 576 (format nil "Error executing ~a: ~a~&~a" procname string reminder))))) 577 577 578 (defparameter *known-optional-features* '(:count-gf-calls :monitor-futex-wait :unique-dcode :qres-ccl :eq-hash-monitor :mixup-hash-code-nop))578 (defparameter *known-optional-features* '(:count-gf-calls :monitor-futex-wait :unique-dcode :qres-ccl :eq-hash-monitor)) 579 579 (defvar *build-time-optional-features* nil) 580 580 (defvar *ccl-save-source-locations* :no-text)
Note:
See TracChangeset
for help on using the changeset viewer.
