Changeset 6145


Ignore:
Timestamp:
Apr 7, 2007, 12:33:15 PM (12 years ago)
Author:
gb
Message:

More FLOAT transforms; some old ones may be redundant if the backend
catches the special case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/objc-gf/ccl/compiler/optimizers.lisp

    r5525 r6145  
    616616          (setf (array-ctype-dimensions ctype)
    617617                '*))))
    618     (let* ((element-type (specifier-type (if element-type-p element-type t))))
     618    (let* ((element-type (specifier-type (if element-type-p (nx-unquote element-type) t))))
    619619      (setf (array-ctype-element-type ctype) element-type)
    620620      (if (typep element-type 'unknown-ctype)
     
    15261526    `(eql (lisptag ,arg) ,fixnum-tag)))
    15271527
    1528 (define-compiler-macro float (&whole w number &optional other)
    1529   (declare (ignore number other))
    1530   w)
     1528
    15311529
    15321530(define-compiler-macro double-float-p (n)
     
    17881786      call)))
    17891787
    1790 (define-compiler-macro float (&whole call number &optional other &environment env)
     1788(define-compiler-macro float (&whole call number &optional (other 0.0f0 other-p) &environment env)
     1789 
    17911790  (cond ((and (typep other 'single-float)
    17921791              (nx-form-typep number 'double-float env))
     
    17951794              (nx-form-typep number 'single-float env))
    17961795         `(the double-float (%single-to-double ,number)))
     1796        ((or (typep other 'single-float)
     1797             (null other-p))
     1798         `(the single-float (%short-float ,number)))
     1799        ((typep other 'double-float)
     1800         `(the double-float (%double-float ,number)))
    17971801        (t call)))
    17981802
Note: See TracChangeset for help on using the changeset viewer.