Permalink
Browse files

slightly more reproducible builds

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.
  • Loading branch information...
1 parent 69d1abb commit 2f796d4527e80a3023a12f7291ef1b637b68d988 @csrhodes csrhodes committed Sep 20, 2012
Showing with 14 additions and 4 deletions.
  1. +1 −1 src/code/cross-type.lisp
  2. +1 −1 src/compiler/meta-vmdef.lisp
  3. +11 −1 src/compiler/ppc/char.lisp
  4. +1 −1 src/compiler/x86-64/array.lisp
View
@@ -248,7 +248,7 @@
(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))
@@ -1415,7 +1415,7 @@
(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)
View
@@ -121,7 +121,17 @@
(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)
@@ -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

0 comments on commit 2f796d4

Please sign in to comment.