]> git.eshelyaron.com Git - emacs.git/commit
Tighter pcase or-pattern member function selection (bug#36139)
authorMattias Engdegård <mattiase@acm.org>
Tue, 21 May 2019 10:19:38 +0000 (12:19 +0200)
committerMattias Engdegård <mattiase@acm.org>
Wed, 19 Jun 2019 09:20:58 +0000 (11:20 +0200)
commitb8c74742c0238fe15b1cdc9a7f6ee021d038368f
treed2d51fb226584f28017cb04ef8c3d173e83f1e87
parent36ab408207d7adf94fd1396922e0df38d746a948
Tighter pcase or-pattern member function selection (bug#36139)

* lisp/emacs-lisp/pcase.el (pcase--u1):
Use the most specific of `memq', `memql' and `member' in or-patterns
with constant cases.  This improves performance and may help the byte-code
compiler generate a switch.
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-member):
Add mixed-type or-pattern test cases.
lisp/emacs-lisp/pcase.el
test/lisp/emacs-lisp/pcase-tests.el