X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcross-type.lisp;h=7fc13938aab58c211f50781af91f109f64ba483e;hb=86210c4e406c1b2ff10cc3bac0e71435867db48b;hp=b59bd3b843a56c83592849181f9cf54f377afd35;hpb=18d4de696bc5063aad026ba62be613c7b07f5fc8;p=sbcl.git diff --git a/src/code/cross-type.lisp b/src/code/cross-type.lisp index b59bd3b..7fc1393 100644 --- a/src/code/cross-type.lisp +++ b/src/code/cross-type.lisp @@ -14,9 +14,7 @@ ;;; Is X a fixnum in the target Lisp? (defun fixnump (x) (and (integerp x) - (<= sb!vm:*target-most-negative-fixnum* - x - sb!vm:*target-most-positive-fixnum*))) + (<= sb!xc:most-negative-fixnum x sb!xc:most-positive-fixnum))) ;;; (This was a useful warning when trying to get bootstrapping ;;; to work, but it's mostly irrelevant noise now that the system @@ -200,9 +198,9 @@ ;; Common Lisp. (Some array types are too, but they ;; were picked off earlier.) (target-type-is-in - '(bit character complex cons float function integer keyword - list nil null number rational real signed-byte symbol t - unsigned-byte)) + '(atom bit character complex cons float function integer keyword + list nil null number rational real signed-byte symbol t + unsigned-byte)) (values (typep host-object target-type) t)) (;; Floating point types are guaranteed to correspond, ;; too, but less exactly. @@ -213,6 +211,12 @@ (values (typep host-object target-type) t)) (t (values nil t)))) + (;; Complexes suffer the same kind of problems as arrays + (and (not (unknown-type-p (values-specifier-type target-type))) + (sb!xc:subtypep target-type 'cl:complex)) + (if (complexp host-object) + (warn-and-give-up) ; general-case complexes being way too hard + (values nil t))) ; but "obviously not a complex" being easy ;; Some types require translation between the cross-compilation ;; host Common Lisp and the target SBCL. ((target-type-is-in '(sb!xc:class)) @@ -338,10 +342,6 @@ (check-type type (or symbol cons)) (cross-typep obj type))) -(defparameter *universal-function-type* - (make-function-type :wild-args t - :returns *wild-type*)) - (defun ctype-of (x) (typecase x (function @@ -353,7 +353,7 @@ ;; There's no ANSI way to find out what the function is ;; declared to be, so we just return the CTYPE for the ;; most-general function. - *universal-function-type*)) + *universal-fun-type*)) (symbol (make-member-type :members (list x))) (number