Changeset 15863
 Timestamp:
 Jul 15, 2013, 9:48:56 AM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/acoderewrite/source/compiler/acoderewrite.lisp
r15805 r15863 671 671 (rewriteacodeform callable)) 672 672 (dolist (form formlist) (rewriteacodeform form))) 673 674 (defacoderewrite acoderewritenumcmp numcmp assertedtype (&whole w cc num1 num2) 675 (let* ((ccval (cadr cc)) 676 (fn (case ccval 677 (:lt '<) 678 (:le '<=) 679 (:eq '=) 680 (:ne '/=) 681 (:ge '>=) 682 (:gt '>)))) 683 (rewriteacodeform num1) 684 (rewriteacodeform num2) 685 (multiplevaluebind (v1 c1) (acodeconstantp num1) 686 (multiplevaluebind (v2 c2) (acodeconstantp num2) 687 (multiplevaluebind (constval error) 688 (if (and c1 c2) 689 (ignoreerrors (funcall fn v1 v2)) 690 (values nil t)) 691 (if (not error) 692 (acoderewriteasconstantref w constval) 693 (let* ((op (acodeoperator w))) 694 (or (acodestrengthreducebinop w num1 num2 *nxtargetfixnumtype* op (%nx1operator %i<>)) 695 (acodestrengthreducebinop w num1 num2 *nxtargetnaturaltype* op (%nx1operator %natural<>)) 696 (acodestrengthreducebinop w num1 num2 'doublefloat op (%nx1operator doublefloatcompare)) 697 (acodestrengthreducebinop w num1 num2 'singlefloat op (%nx1operator shortfloatcompare)) 698 ;; Could try contagion here 699 ))))))))
Note: See TracChangeset
for help on using the changeset viewer.