diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2021-07-28 21:07:58 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2021-09-06 16:47:13 +0200 |
commit | fab1e220dbe38ab7a2f46b673dfc03964e496798 (patch) | |
tree | 58a569827f02107d01f328c7f567fb77d6b8377e /lisp/emacs-lisp/bytecomp.el | |
parent | ba6df554755e1989670e23220d2d14bc8e389274 (diff) | |
download | emacs-fab1e220dbe38ab7a2f46b673dfc03964e496798.tar.gz emacs-fab1e220dbe38ab7a2f46b673dfc03964e496798.tar.bz2 emacs-fab1e220dbe38ab7a2f46b673dfc03964e496798.zip |
Optimise `member` and `assoc` (etc) with constant empty list
* lisp/emacs-lisp/byte-opt.el
(byte-optimize-assq): New.
(byte-optimize-member, byte-optimize-assoc, byte-optimize-memq):
When the list argument is constant nil, the result is always nil.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
0 files changed, 0 insertions, 0 deletions