mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Remove name-based "random" hash for funcallable-instance
This commit is contained in:
parent
1d6df61f23
commit
f207c62c51
|
|
@ -65,12 +65,10 @@
|
|||
|
||||
(defun allocate-standard-funcallable-instance (wrapper name)
|
||||
(declare (layout wrapper))
|
||||
(let* ((hash (if name
|
||||
;; Named functions have a predictable hash
|
||||
(mix (sxhash name) (symbol-hash :generic-function)) ; arb. constant
|
||||
(sb-kernel::quasi-random-address-based-hash
|
||||
(declare (ignore name))
|
||||
(let* ((hash (sb-kernel::quasi-random-address-based-hash
|
||||
(load-time-value (make-array 1 :element-type '(and fixnum unsigned-byte)))
|
||||
most-positive-fixnum)))
|
||||
most-positive-fixnum))
|
||||
(slots (make-array (layout-length wrapper) :initial-element +slot-unbound+))
|
||||
(fin (truly-the funcallable-instance
|
||||
(%make-standard-funcallable-instance
|
||||
|
|
|
|||
2
tests/clos-hash.impure.lisp
Normal file
2
tests/clos-hash.impure.lisp
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(test-util:with-test (:name :very-random-hashes)
|
||||
(dotimes (i 10000) (fmakunbound 'foo) (eval '(defgeneric foo (a b c)))))
|
||||
Loading…
Reference in a new issue