summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/byte-opt.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2019-06-07 17:04:10 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2019-06-19 11:22:21 +0200
commitd3a7f3e6cd0124e62ed2b5ffc87eee57fee39a9a (patch)
tree865b52b1a0a33438b35a766de7198cea8aea3488 /lisp/emacs-lisp/byte-opt.el
parent14a81524c27ab54850e0fda736e4ee0c92e447b5 (diff)
downloademacs-d3a7f3e6cd0124e62ed2b5ffc87eee57fee39a9a.tar.gz
emacs-d3a7f3e6cd0124e62ed2b5ffc87eee57fee39a9a.tar.bz2
emacs-d3a7f3e6cd0124e62ed2b5ffc87eee57fee39a9a.zip
Compile any subsequence of `cond' clauses to switch (bug#36139)
A single `cond' form can how be compiled to any number of switch ops, optionally interspersed with non-switch conditions. Previously, switch ops would only be used for whole `cond' forms containing no other tests. * lisp/emacs-lisp/bytecomp.el (byte-compile--cond-vars): Rename from `byte-compile-cond-vars'. (byte-compile--default-val): Remove. (byte-compile--cond-switch-prefix): Replace `byte-compile-cond-jump-table-info'; now also returns trailing non-switch clauses. (byte-compile-cond-jump-table): New arguments; no longer compiles the default case. (byte-compile-cond): Look for and compile switches at any place in the list of clauses. * test/lisp/emacs-lisp/bytecomp-tests.el (byte-opt-testsuite-arith-data): Add test expression.
Diffstat (limited to 'lisp/emacs-lisp/byte-opt.el')
0 files changed, 0 insertions, 0 deletions