APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1293666450 0
# Node ID 596011a8bf8f3213e57c83b56f3cffe3d237e043
# Parent 5ed261fd2bd96afdcdd4a8e25802213ab9e79c0a
= < > <= >=: it's OK to use the compiler macro when first, last args side
effect
2010-12-29 Aidan Kehoe <kehoea(a)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.
diff -r 5ed261fd2bd9 -r 596011a8bf8f lisp/ChangeLog
--- 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(a)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(a)parhasard.net>
* cl-macs.el (inline-side-effect-free-compiler-macros):
diff -r 5ed261fd2bd9 -r 596011a8bf8f lisp/cl-macs.el
--- 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)
--
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
-- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches