]> git.eshelyaron.com Git - emacs.git/commit
Compile cond with heterogeneous tests into switch (bug#36139)
authorMattias Engdegård <mattiase@acm.org>
Wed, 22 May 2019 10:36:03 +0000 (12:36 +0200)
committerMattias Engdegård <mattiase@acm.org>
Wed, 19 Jun 2019 09:20:59 +0000 (11:20 +0200)
commit14a81524c27ab54850e0fda736e4ee0c92e447b5
tree07dae25c695381ab4dc7c5fe70543276b90ace82
parentb8c74742c0238fe15b1cdc9a7f6ee021d038368f
Compile cond with heterogeneous tests into switch (bug#36139)

Allow any mixture of `eq', `eql' and `equal', `memq', `memql' and
`member' in a switch-like `cond' to be compiled into a single switch.

* lisp/emacs-lisp/bytecomp.el (byte-compile--common-test): New.
(byte-compile-cond-jump-table-info): Use most specific common test.
* test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data):
Add test cases for multi-value clause cond forms.
lisp/emacs-lisp/bytecomp.el
test/lisp/emacs-lisp/bytecomp-tests.el