X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Ftarget-sxhash.lisp;h=55d23c5a4b4389a908a25c0983ccc5a61e90f275;hb=d4c7ab04ed10729a2cfa3321f4382d8a218ad958;hp=99e0830773f2a122a16aa0f5d947ce999e36a60e;hpb=aa15be083d706358ce3611e750b95b7abcde6d61;p=sbcl.git diff --git a/src/code/target-sxhash.lisp b/src/code/target-sxhash.lisp index 99e0830..55d23c5 100644 --- a/src/code/target-sxhash.lisp +++ b/src/code/target-sxhash.lisp @@ -36,9 +36,10 @@ ;;; * We'd like this to be simple and fast, too. ;;; ;;; FIXME: Should this be INLINE? -(declaim (ftype (function ((and fixnum unsigned-byte) - (and fixnum unsigned-byte)) - (and fixnum unsigned-byte)) mix)) +(declaim (ftype (sfunction ((and fixnum unsigned-byte) + (and fixnum unsigned-byte)) + (and fixnum unsigned-byte)) + mix)) (defun mix (x y) ;; FIXME: We wouldn't need the nasty (SAFETY 0) here if the compiler ;; were smarter about optimizing ASH. (Without the THE FIXNUM below, @@ -89,7 +90,7 @@ (declare (type string string)) (declare (type index count)) (let ((result 0)) - (declare (type (unsigned-byte 32) result)) + (declare (type (unsigned-byte 32) result)) (unless (typep string '(vector nil)) (dotimes (i count) (declare (type index i)) @@ -144,6 +145,12 @@ ;;;; the SXHASH function +;; simple cases +(declaim (ftype (sfunction (integer) (integer 0 #.sb!xc:most-positive-fixnum)) + sxhash-bignum)) +(declaim (ftype (sfunction (t) (integer 0 #.sb!xc:most-positive-fixnum)) + sxhash-instance)) + (defun sxhash (x) ;; profiling SXHASH is hard, but we might as well try to make it go ;; fast, in case it is the bottleneck somwhere. -- CSR, 2003-03-14