Mercurial > hg > xemacs-beta
comparison lisp/byte-optimize.el @ 464:5aa1854ad537 r21-2-47
Import from CVS: tag r21-2-47
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:45:51 +0200 |
parents | 3d3049ae1304 |
children | cf82e22962ce |
comparison
equal
deleted
inserted
replaced
463:a158004111cd | 464:5aa1854ad537 |
---|---|
727 ;; If form is (- CONST foo... CONST), merge first and last. | 727 ;; If form is (- CONST foo... CONST), merge first and last. |
728 ((and (numberp (nth 1 form)) (numberp last)) | 728 ((and (numberp (nth 1 form)) (numberp last)) |
729 (decf (nth 1 form) last) | 729 (decf (nth 1 form) last) |
730 (butlast form)) | 730 (butlast form)) |
731 | 731 |
732 ;; (- 0 x ...) --> (- (- x) ...) | 732 ;; (- 0 ...) --> |
733 ((and (eq 0 (nth 1 form)) (>= (length form) 3)) | 733 ((eq 0 (nth 1 form)) |
734 `(- (- ,(nth 2 form)) ,@(nthcdr 3 form))) | 734 (case (length form) |
735 ;; (- 0) --> 0 | |
736 (2 0) | |
737 ;; (- 0 x) --> (- x) | |
738 (3 `(- ,(nth 2 form))) | |
739 ;; (- 0 x y ...) --> (- (- x) y ...) | |
740 (t `(- (- ,(nth 2 form)) ,@(nthcdr 3 form))))) | |
735 | 741 |
736 (t (byte-optimize-predicate form))))) | 742 (t (byte-optimize-predicate form))))) |
737 | 743 |
738 (defun byte-optimize-divide (form) | 744 (defun byte-optimize-divide (form) |
739 ;; Put constants at the end, except the first arg. | 745 ;; Put constants at the end, except the first arg. |