[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117162: * lisp/emacs-lisp/byte-opt.el (byte-opti
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs-24 r117162: * lisp/emacs-lisp/byte-opt.el (byte-optimize-binary-predicate): Don't assume |
Date: |
Tue, 27 May 2014 14:56:10 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117162
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17584
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-05-27 10:56:03 -0400
message:
* lisp/emacs-lisp/byte-opt.el (byte-optimize-binary-predicate): Don't assume
there can't be more than 2 arguments.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/emacs-lisp/byte-opt.el byteopt.el-20091113204419-o5vbwnq5f7feedwu-491
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-05-27 01:53:45 +0000
+++ b/lisp/ChangeLog 2014-05-27 14:56:03 +0000
@@ -1,3 +1,8 @@
+2014-05-27 Stefan Monnier <address@hidden>
+
+ * emacs-lisp/byte-opt.el (byte-optimize-binary-predicate): Don't assume
+ there can't be more than 2 arguments (bug#17584).
+
2014-05-27 Glenn Morris <address@hidden>
* simple.el (filter-buffer-substring-functions)
=== modified file 'lisp/emacs-lisp/byte-opt.el'
--- a/lisp/emacs-lisp/byte-opt.el 2014-02-10 01:34:22 +0000
+++ b/lisp/emacs-lisp/byte-opt.el 2014-05-27 14:56:03 +0000
@@ -859,14 +859,16 @@
(defun byte-optimize-binary-predicate (form)
- (if (macroexp-const-p (nth 1 form))
- (if (macroexp-const-p (nth 2 form))
- (condition-case ()
- (list 'quote (eval form))
- (error form))
- ;; This can enable some lapcode optimizations.
- (list (car form) (nth 2 form) (nth 1 form)))
- form))
+ (cond
+ ((or (not (macroexp-const-p (nth 1 form)))
+ (nthcdr 3 form)) ;; In case there are more than 2 args.
+ form)
+ ((macroexp-const-p (nth 2 form))
+ (condition-case ()
+ (list 'quote (eval form))
+ (error form)))
+ (t ;; This can enable some lapcode optimizations.
+ (list (car form) (nth 2 form) (nth 1 form)))))
(defun byte-optimize-predicate (form)
(let ((ok t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117162: * lisp/emacs-lisp/byte-opt.el (byte-optimize-binary-predicate): Don't assume,
Stefan Monnier <=