X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fsrctran.lisp;h=d2e302881c0b3ebd09c6905c130c1fb8caf8d387;hb=b2426aa7337c9eae7a325e39e381aaf704294d8e;hp=5a1a358ee871ed0fbc2d5c505c0a191021035948;hpb=068edb68ca05bcb3c758150155b04cf8acc72ba1;p=sbcl.git diff --git a/src/compiler/srctran.lisp b/src/compiler/srctran.lisp index 5a1a358..d2e3028 100644 --- a/src/compiler/srctran.lisp +++ b/src/compiler/srctran.lisp @@ -317,10 +317,12 @@ (defmacro safely-binop (op x y) `(cond ((typep ,x 'single-float) - (if (<= most-negative-single-float ,y most-positive-single-float) + (if (or (typep ,y 'single-float) + (<= most-negative-single-float ,y most-positive-single-float)) (,op ,x ,y))) ((typep ,x 'double-float) - (if (<= most-negative-double-float ,y most-positive-double-float) + (if (or (typep ,y 'double-float) + (<= most-negative-double-float ,y most-positive-double-float)) (,op ,x ,y))) ((typep ,y 'single-float) (if (<= most-negative-single-float ,x most-positive-single-float) @@ -339,7 +341,7 @@ (defun coerce-for-bound (val type) (if (consp val) - (list (coerce-for-bound val)) + (list (coerce-for-bound (car val) type)) (cond ((subtypep type 'double-float) (if (<= most-negative-double-float val most-positive-double-float) @@ -3657,6 +3659,10 @@ (when (stringp x) (check-format-args x args 'format))))) +;;; We disable this transform in the cross-compiler to save memory in +;;; the target image; most of the uses of FORMAT in the compiler are for +;;; error messages, and those don't need to be particularly fast. +#+sb-xc (deftransform format ((dest control &rest args) (t simple-string &rest t) * :policy (> speed space)) (unless (constant-lvar-p control)