]> git.eshelyaron.com Git - emacs.git/commit
Fix cond jump table compilation (bug#42919)
authorMattias Engdegård <mattiase@acm.org>
Wed, 19 Aug 2020 12:59:29 +0000 (14:59 +0200)
committerMattias Engdegård <mattiase@acm.org>
Wed, 19 Aug 2020 13:26:34 +0000 (15:26 +0200)
commit5fcb97dabd3f7b00ebc574d6be4bad16a64482de
tree0ec796e0803703a9c1750dff6b0c63cabb693351
parent362ca83a3b9d74c51ac325a6490551272aa25f9a
Fix cond jump table compilation (bug#42919)

This bug affected compilation of

 (cond ((member '(some list) variable) ...) ...)

While equal is symmetric, member is not; in the latter case the
arguments must be a variable and a constant list, in that order.

Reported by Ikumi Keita.

* lisp/emacs-lisp/bytecomp.el (byte-compile--cond-switch-prefix):
Don't treat equality and member predicates in the same way; only
the former are symmetric in their arguments.
* test/lisp/emacs-lisp/bytecomp-tests.el
(byte-opt-testsuite-arith-data): Add test cases.
lisp/emacs-lisp/bytecomp.el
test/lisp/emacs-lisp/bytecomp-tests.el