X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ffloat-tran.lisp;h=ec1fabfe9f8aac8c71fc6c06d3f1e3756fdcb41f;hb=80f222325e1f677e5cf8de01c6990906fa47f65d;hp=c18356b6f8d480346bcca98bd040a5047e7767d2;hpb=43980afbf2f02ff68b3cfb62be9051fabe164de0;p=sbcl.git diff --git a/src/compiler/float-tran.lisp b/src/compiler/float-tran.lisp index c18356b..ec1fabf 100644 --- a/src/compiler/float-tran.lisp +++ b/src/compiler/float-tran.lisp @@ -137,10 +137,10 @@ (values double-float-significand double-float-int-exponent (integer -1 1)) (movable foldable flushable)) -(defknown scale-single-float (single-float fixnum) single-float +(defknown scale-single-float (single-float integer) single-float (movable foldable flushable)) -(defknown scale-double-float (double-float fixnum) double-float +(defknown scale-double-float (double-float integer) double-float (movable foldable flushable)) (deftransform decode-float ((x) (single-float) *) @@ -1396,19 +1396,6 @@ (macrolet ((def (float-type fun) `(deftransform %unary-ftruncate ((x) (,float-type)) - (let ((x-type (lvar-type x)) - ;; these bounds may look wrong, but in fact they're - ;; right: floats within these bounds are those which - ;; TRUNCATE to a (SIGNED-BYTE 32). ROUND would be - ;; different. - (low-bound (coerce (- (ash 1 31)) ',float-type)) - (high-bound (coerce (ash 1 31) ',float-type))) - (if (csubtypep x-type - (specifier-type - `(,',float-type (,low-bound) (,high-bound)))) - '(coerce (%unary-truncate x) ',float-type) - `(if (< ,low-bound x ,high-bound) - (coerce (%unary-truncate x) ',',float-type) - (,',fun x))))))) + '(,fun x)))) (def single-float %unary-ftruncate/single) (def double-float %unary-ftruncate/double))