Update of /cvsroot/sbcl/sbcl/src/compiler
In directory sc8-pr-cvs1:/tmp/cvs-serv26714/src/compiler
Modified Files:
float-tran.lisp fndb.lisp
Log Message:
0.8.3.20:
Fixed bug revealed by PFD in *.26:
... (FLOAT X) should be transformed to guard against X already
being a float, in which case no coercion should occur.
Minor adjustments:
... tighten up the type of RANDOM;
... textual frobs around RANDOM area.
(there's an extremely strange bug in RANDOM on the powerpc,
which I haven't yet logged but will do if I can't figure out
what's going on)
Index: float-tran.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/float-tran.lisp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- float-tran.lisp 21 Aug 2003 09:18:59 -0000 1.26
+++ float-tran.lisp 1 Sep 2003 14:44:44 -0000 1.27
@@ -18,11 +18,16 @@
(defknown %single-float (real) single-float (movable foldable flushable))
(defknown %double-float (real) double-float (movable foldable flushable))
-(deftransform float ((n &optional f) (* &optional single-float) *)
+(deftransform float ((n f) (* single-float) *)
'(%single-float n))
(deftransform float ((n f) (* double-float) *)
'(%double-float n))
+
+(deftransform float ((n) *)
+ '(if (floatp n)
+ n
+ (%single-float n)))
(deftransform %single-float ((n) (single-float) *)
'n)
Index: fndb.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/fndb.lisp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -d -r1.80 -r1.81
--- fndb.lisp 17 Aug 2003 17:17:07 -0000 1.80
+++ fndb.lisp 1 Sep 2003 14:44:44 -0000 1.81
@@ -393,7 +393,8 @@
(movable foldable flushable))
(defknown deposit-field (integer byte-specifier integer) integer
(movable foldable flushable))
-(defknown random ((real (0)) &optional random-state) (real 0) ())
+(defknown random ((or (float (0.0)) (integer 1)) &optional random-state)
+ (or (float 0.0) (integer 0)) ())
(defknown make-random-state (&optional (or (member nil t) random-state))
random-state (flushable))
(defknown random-state-p (t) boolean (movable foldable flushable))
|