From 5b960d84bf4cd8180828ea77714f4cf6a0adcb6e Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Sun, 15 Feb 2015 15:52:46 -0500 Subject: [PATCH] Fix proclamations for TYPE-CACHE-HASH and TYPE-LIST-CACHE-HASH This was actually broken for a while because type-hash values are target fixnums, and not necessarily host fixnums. As of recently, they can be of either sign, which seems to have exposed the problem. Thanks to Stas for pointing it out. --- src/code/typedefs.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/code/typedefs.lisp b/src/code/typedefs.lisp index 7f2b79322..a94f143f1 100644 --- a/src/code/typedefs.lisp +++ b/src/code/typedefs.lisp @@ -175,12 +175,14 @@ ;;; it important for it to be INLINE, or could be become an ordinary ;;; function without significant loss? -- WHN 19990413 #!-sb-fluid (declaim (inline type-cache-hash)) -(declaim (ftype (function (ctype ctype) fixnum) type-cache-hash)) +(declaim (ftype (function (ctype ctype) (signed-byte #.sb!vm:n-fixnum-bits)) + type-cache-hash)) (defun type-cache-hash (type1 type2) (logxor (ash (type-hash-value type1) -3) (type-hash-value type2))) #!-sb-fluid (declaim (inline type-list-cache-hash)) -(declaim (ftype (function (list) fixnum) type-list-cache-hash)) +(declaim (ftype (function (list) (signed-byte #.sb!vm:n-fixnum-bits)) + type-list-cache-hash)) (defun type-list-cache-hash (types) (loop with res fixnum = 0 for type in types -- 2.11.4.GIT