X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fglobaldb.lisp;h=05bee480996090406bb9a7f0f965da063925c30b;hb=0e5a40455a1a3cc16cc71ad0f0b063eb4f1f2c3f;hp=8a7a6ef6495ffbb51b93f18ce652c6e038f0428d;hpb=22b819c0cd0ca0ea5be52ba280b9e9e0b8e86210;p=sbcl.git diff --git a/src/compiler/globaldb.lisp b/src/compiler/globaldb.lisp index 8a7a6ef..05bee48 100644 --- a/src/compiler/globaldb.lisp +++ b/src/compiler/globaldb.lisp @@ -541,7 +541,20 @@ ;;; Encache NAME in the compact environment ENV. HASH is the ;;; GLOBALDB-SXHASHOID of NAME. (defun compact-info-lookup (env name hash) - (declare (type compact-info-env env) (type index hash)) + (declare (type compact-info-env env) + ;; FIXME: this used to read (TYPE INDEX HASH), but that was + ;; wrong, because HASH was a positive fixnum, not a (MOD + ;; MOST-POSITIVE-FIXNUM). + ;; + ;; However, this, its replacement, is also wrong. In the + ;; cross-compiler, GLOBALDB-SXHASHOID is essentially + ;; SXHASH. But our host compiler could have any value at + ;; all as its MOST-POSITIVE-FIXNUM, and so could in + ;; principle return a value exceeding our target positive + ;; fixnum range. + ;; + ;; My brain hurts. -- CSR, 2003-08-28 + (type (integer 0 #.sb!xc:most-positive-fixnum) hash)) (let* ((table (compact-info-env-table env)) (len (length table)) (len-2 (- len 2)) @@ -703,7 +716,9 @@ ;;; Just like COMPACT-INFO-LOOKUP, only do it on a volatile environment. (defun volatile-info-lookup (env name hash) - (declare (type volatile-info-env env) (type index hash)) + (declare (type volatile-info-env env) + ;; FIXME: see comment in COMPACT-INFO-LOOKUP + (type (integer 0 #.sb!xc:most-positive-fixnum) hash)) (let ((table (volatile-info-env-table env))) (macrolet ((lookup (test) `(dolist (entry (svref table (mod hash (length table))) ()) @@ -714,7 +729,6 @@ (lookup eq) (lookup equal))) (setf (volatile-info-env-cache-name env) name))) - (values)) ;;; Given a volatile environment ENV, bind TABLE-VAR the environment's table