slightly more reproducible builds
authorChristophe Rhodes <csr21@cantab.net>
Thu, 20 Sep 2012 15:10:55 +0000 (16:10 +0100)
committerChristophe Rhodes <csr21@cantab.net>
Tue, 2 Oct 2012 17:52:15 +0000 (18:52 +0100)
in vop templates, (:constant <type>) eventually boiled down to a TYPEP
test.  For (:constant fixnum) in the cross-compiler, this is not right,
because the typep test runs on the host.  Use SB!XC:TYPEP instead, which
means making sure that types are available to the cross-compiler (using
DEF!TYPE instead of DEFTYPE).  Tested on x86-64; one issue on ppc fixed
blindly.

src/code/cross-type.lisp
src/compiler/meta-vmdef.lisp
src/compiler/ppc/char.lisp
src/compiler/x86-64/array.lisp

index e431dbb..1ffb2c2 100644 (file)
              (if (stringp host-object)
                  (warn-and-give-up)
                  (values nil t)))
-            ((target-type-is-in '(character base-char))
+            ((target-type-is-in '(character base-char standard-char))
              (cond ((typep host-object 'standard-char)
                     (values t t))
                    ((not (characterp host-object))
index d59da64..1242e96 100644 (file)
                               (rest type))))
            (:constant
             ``(:constant ,#'(lambda (x)
-                              (typep x ',(second type)))
+                              (sb!xc:typep x ',(second type)))
                          ,',(second type)))))))
 
 (defun specify-operand-types (types ops more-ops)
index 8a4e063..a7400ab 100644 (file)
 
 (define-vop (character-compare/c)
   (:args (x :scs (character-reg)))
-  (:arg-types character (:constant (satisfies inlinable-character-constant-p)))
+  (:arg-types character
+              ;; KLUDGE: having a SATISFIES type here is too hairy for
+              ;; the cross-compiler (running on an arbitrary CL host)
+              ;; to cope with.  Since we know we only have standard
+              ;; characters in the build anyway, we can restrict the
+              ;; cross-compiler's arg type to standard char, and all
+              ;; is well.
+              #+sb-xc-host
+              (:constant standard-char)
+              #-sb-xc-host
+              (:constant (satisfies inlinable-character-constant-p)))
   (:conditional)
   (:info target not-p y)
   (:policy :fast-safe)
index 6102251..7ba5839 100644 (file)
@@ -14,7 +14,7 @@
 
 ;; For use in constant indexing; we can't use INDEX since the displacement
 ;; field of an EA can't contain 64 bit values.
-(deftype low-index () '(signed-byte 29))
+(def!type low-index () '(signed-byte 29))
 
 ;;;; allocator for the array header