Update of /cvsroot/sbcl/sbcl/src/compiler
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23711/src/compiler
Modified Files:
early-c.lisp globaldb.lisp
Log Message:
0.9.0.3:
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.
Index: early-c.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/early-c.lisp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- early-c.lisp 1 Mar 2005 10:21:32 -0000 1.32
+++ early-c.lisp 28 Apr 2005 22:20:42 -0000 1.33
@@ -16,16 +16,16 @@
(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: globaldb.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/globaldb.lisp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- globaldb.lisp 6 Apr 2005 01:47:38 -0000 1.37
+++ globaldb.lisp 28 Apr 2005 22:20:43 -0000 1.38
@@ -54,18 +54,19 @@
;;; 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.
;;;
@@ -550,18 +551,6 @@
;;; 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))
@@ -725,7 +714,6 @@
;;; 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)
|