Mercurial > hg > xemacs-beta
changeset 5314:596011a8bf8f
= < > <= >=: it's OK to use the compiler macro when first, last args side effect
2010-12-29 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (= < > <= >=):
For these functions' compiler macros, the optimisation is safe
even if the first and the last arguments have side effects, since
they're only used the once.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 29 Dec 2010 23:47:30 +0000 |
parents | 5ed261fd2bd9 |
children | 2a7b6ddb8063 |
files | lisp/ChangeLog lisp/cl-macs.el |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Wed Dec 29 23:43:10 2010 +0000 +++ b/lisp/ChangeLog Wed Dec 29 23:47:30 2010 +0000 @@ -1,3 +1,10 @@ +2010-12-29 Aidan Kehoe <kehoea@parhasard.net> + + * cl-macs.el (= < > <= >=): + For these functions' compiler macros, the optimisation is safe + even if the first and the last arguments have side effects, since + they're only used the once. + 2010-12-29 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el (inline-side-effect-free-compiler-macros):
--- a/lisp/cl-macs.el Wed Dec 29 23:43:10 2010 +0000 +++ b/lisp/cl-macs.el Wed Dec 29 23:47:30 2010 +0000 @@ -3752,7 +3752,7 @@ (put function 'cl-compiler-macro #'(lambda (form &rest arguments) (if (or (null (nthcdr 3 form)) - (notevery #'cl-safe-expr-p (cdr form))) + (notevery #'cl-safe-expr-p (butlast (cdr arguments)))) form (cons 'and (mapcon #'(lambda (rest)