X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fconstraint.lisp;h=328056a70e08f3b33eb3412c06a3d9b79c8bb627;hb=872175cd9cb5b4966a36d4bd92421cc407a0355b;hp=52b6ee9d660df4073edbb66dc9441bd56167425d;hpb=334af30b26555f0bf706f7157b399bdbd4fad548;p=sbcl.git diff --git a/src/compiler/constraint.lisp b/src/compiler/constraint.lisp index 52b6ee9..328056a 100644 --- a/src/compiler/constraint.lisp +++ b/src/compiler/constraint.lisp @@ -266,18 +266,13 @@ ;;; Exactly the same as CONSTRAIN-INTEGER-TYPE, but for float numbers. (defun constrain-float-type (x y greater or-equal) (declare (type numeric-type x y)) - ;; FIXME: The comment here used to say - ;; Unless #!+SB-PROPAGATE-FLOAT-TYPE, then SB!C::BOUND-VALUE (used in - ;; the code below) is not defined, so we just return X without - ;; trying to calculate additional constraints. - ;; But as of sbcl-0.6.11.26, SB!C::BOUND-VALUE has been renamed to - ;; SB!INT:TYPE-BOUND-NUMBER and is always defined, so probably the - ;; conditionalization should go away. - #!-sb-propagate-float-type (declare (ignore greater or-equal)) + (declare (ignorable x y greater or-equal)) ; for CROSS-FLOAT-INFINITY-KLUDGE + (aver (eql (numeric-type-class x) 'float)) (aver (eql (numeric-type-class y) 'float)) - #!-sb-propagate-float-type x - #!+sb-propagate-float-type + #+sb-xc-host ; (See CROSS-FLOAT-INFINITY-KLUDGE.) + x + #-sb-xc-host ; (See CROSS-FLOAT-INFINITY-KLUDGE.) (labels ((exclude (x) (cond ((not x) nil) (or-equal x) @@ -361,7 +356,6 @@ (let ((greater (if not-p (not greater) greater))) (setq res (constrain-integer-type res y greater not-p))))) - #!+sb-constrain-float-type ((and (float-type-p res) (float-type-p y)) (let ((greater (eq kind '>))) (let ((greater (if not-p (not greater) greater))) @@ -375,7 +369,7 @@ (csubtypep (specifier-type 'null) not-res) (eq (continuation-asserted-type cont) *wild-type*)) (setf (node-derived-type ref) *wild-type*) - (change-ref-leaf ref (find-constant 't))) + (change-ref-leaf ref (find-constant t))) (t (derive-node-type ref (or (type-difference res not-res) res))))))) @@ -518,4 +512,3 @@ (use-result-constraints block)) (values)) -