0.8.3.8:
authorChristophe Rhodes <csr21@cam.ac.uk>
Thu, 28 Aug 2003 10:53:49 +0000 (10:53 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Thu, 28 Aug 2003 10:53:49 +0000 (10:53 +0000)
Fix globaldb type errors
... SXHASH can return the most positive fixnum
Don't fix globaldb potential bootstrap problem
... leave it for when we have a typesafe 64-bit lisp, able to
detect the errors

NEWS
src/compiler/globaldb.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 59d5bdf..045eab5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2008,6 +2008,9 @@ changes in sbcl-0.8.4 relative to sbcl-0.8.3:
     support has been systematized, and now supports the methods
     specified by ANSI, along with a default method and a method for
     slot documentation.  (reported by Nathan Froyd)
     support has been systematized, and now supports the methods
     specified by ANSI, along with a default method and a method for
     slot documentation.  (reported by Nathan Froyd)
+  * bug fix: effective methods associated with a generic function are
+    no longer cached over a change of that generic function's method
+    combination.  (reported by Andreas Fuchs)
   * optimization: restored some effective method precomputation in
     CLOS (turned off by an ANSI fix in sbcl-0.8.3); the amount of
     precomputation is now tunable.
   * optimization: restored some effective method precomputation in
     CLOS (turned off by an ANSI fix in sbcl-0.8.3); the amount of
     precomputation is now tunable.
index 8a7a6ef..05bee48 100644 (file)
 ;;; Encache NAME in the compact environment ENV. HASH is the
 ;;; GLOBALDB-SXHASHOID of NAME.
 (defun compact-info-lookup (env name hash)
 ;;; 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))
   (let* ((table (compact-info-env-table env))
         (len (length table))
         (len-2 (- len 2))
 
 ;;; Just like COMPACT-INFO-LOOKUP, only do it on a volatile environment.
 (defun volatile-info-lookup (env name hash)
 
 ;;; 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))) ())
   (let ((table (volatile-info-env-table env)))
     (macrolet ((lookup (test)
                 `(dolist (entry (svref table (mod hash (length table))) ())
                (lookup eq)
                (lookup equal)))
       (setf (volatile-info-env-cache-name env) name)))
                (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
   (values))
 
 ;;; Given a volatile environment ENV, bind TABLE-VAR the environment's table
index 0807e2b..28f00e1 100644 (file)
@@ -16,4 +16,4 @@
 ;;; with something arbitrary in the fourth field, is used for CVS
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; with something arbitrary in the fourth field, is used for CVS
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
-"0.8.3.7"
+"0.8.3.8"