0.9.0.3:
authorJuho Snellman <jsnell@iki.fi>
Thu, 28 Apr 2005 22:20:40 +0000 (22:20 +0000)
committerJuho Snellman <jsnell@iki.fi>
Thu, 28 Apr 2005 22:20:40 +0000 (22:20 +0000)
Fix a few leakages from the host environment that only mattered
        when the host compiler had a larger fixnum size than the target.
        Building a 32-bit SBCL with a 64-bit SBCL as host should now work.

        * COMPACT-INFO-LOOKUP FIXME fixed by LOGANDing the return-value
          of GLOBALDB-SXHASHOID with SB!XC:MOST-POSITIVE-FIXNUM
        * Some !constants (LAYOUT-CLOS-HASH-MAX, CALL-ARGUMENTS-LIMIT,
          etc) were derived from MOST-POSITIVE-FIXNUM. Use
          SB!XC:MOST-POSITIVE-FIXNUM instead.

NEWS
src/code/class.lisp
src/compiler/early-c.lisp
src/compiler/globaldb.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 1ddc538..1658f72 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+changes in sbcl-0.9.1 relative to sbcl-0.9.0:
+  * fixed cross-compiler leakages that prevented building a 32-bit
+    target with a 64-bit host compiler.
+
 changes in sbcl-0.9.0 relative to sbcl-0.8.21:
   * incompatible change: the --noprogrammer option, deprecated since
     version 0.7.5, has been removed.  Please use the equivalent
index 535914c..c41894e 100644 (file)
@@ -84,7 +84,7 @@
 ;;; Note: This bound is set somewhat less than MOST-POSITIVE-FIXNUM
 ;;; in order to guarantee that several hash values can be added without
 ;;; overflowing into a bignum.
-(def!constant layout-clos-hash-max (ash most-positive-fixnum -3)
+(def!constant layout-clos-hash-max (ash sb!xc:most-positive-fixnum -3)
   #!+sb-doc
   "the inclusive upper bound on LAYOUT-CLOS-HASH values")
 
index 11f7176..2d2444f 100644 (file)
 (in-package "SB!C")
 
 ;;; ANSI limits on compilation
-(def!constant sb!xc:call-arguments-limit most-positive-fixnum
+(def!constant sb!xc:call-arguments-limit sb!xc:most-positive-fixnum
   #!+sb-doc
   "The exclusive upper bound on the number of arguments which may be passed
   to a function, including &REST args.")
-(def!constant sb!xc:lambda-parameters-limit most-positive-fixnum
+(def!constant sb!xc:lambda-parameters-limit sb!xc:most-positive-fixnum
   #!+sb-doc
   "The exclusive upper bound on the number of parameters which may be specifed
   in a given lambda list. This is actually the limit on required and &OPTIONAL
   parameters. With &KEY and &AUX you can get more.")
-(def!constant sb!xc:multiple-values-limit most-positive-fixnum
+(def!constant sb!xc:multiple-values-limit sb!xc:most-positive-fixnum
   #!+sb-doc
   "The exclusive upper bound on the number of multiple VALUES that you can
   return.")
index 221210d..70aefce 100644 (file)
 ;;; aren't used too early in cold boot for SXHASH to run).
 #!-sb-fluid (declaim (inline globaldb-sxhashoid))
 (defun globaldb-sxhashoid (x)
-  (cond        ((symbolp x) (sxhash x))
-       ((and (listp x)
-             (eq (first x) 'setf)
-             (let ((rest (rest x)))
-               (and (symbolp (car rest))
-                    (null (cdr rest)))))
-        ;; We need to declare the type of the value we're feeding to
-        ;; SXHASH so that the DEFTRANSFORM on symbols kicks in.
-        (let ((symbol (second x)))
-          (declare (symbol symbol))
-          (logxor (sxhash symbol) 110680597)))
-       (t (sxhash x))))
+  (logand sb!xc:most-positive-fixnum
+         (cond ((symbolp x) (sxhash x))
+               ((and (listp x)
+                     (eq (first x) 'setf)
+                     (let ((rest (rest x)))
+                       (and (symbolp (car rest))
+                            (null (cdr rest)))))
+                ;; We need to declare the type of the value we're feeding to
+                ;; SXHASH so that the DEFTRANSFORM on symbols kicks in.
+                (let ((symbol (second x)))
+                  (declare (symbol symbol))
+                  (logxor (sxhash symbol) 110680597)))
+               (t (sxhash x)))))
 
 ;;; Given any non-negative integer, return a prime number >= to it.
 ;;;
 ;;; GLOBALDB-SXHASHOID of NAME.
 (defun compact-info-lookup (env name 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))
 ;;; 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)
-          ;; 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)
index e735e52..ae81130 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.0.2"
+"0.9.0.3"