diff options
author | Vibhav Pant <vibhavp@gmail.com> | 2017-01-15 21:38:31 +0530 |
---|---|---|
committer | Vibhav Pant <vibhavp@gmail.com> | 2017-01-15 21:38:31 +0530 |
commit | 309b46420e83826ed1e0b947f98a47e8525e3c36 (patch) | |
tree | 4fde369badc873d3dfff7f6074cfa91000fb931f /lisp/emacs-lisp | |
parent | 8c0f326ea237e8acd03c51c1b3a44d237c044562 (diff) | |
download | emacs-309b46420e83826ed1e0b947f98a47e8525e3c36.tar.gz emacs-309b46420e83826ed1e0b947f98a47e8525e3c36.tar.bz2 emacs-309b46420e83826ed1e0b947f98a47e8525e3c36.zip |
* lisp/emacs-lisp/byte-opt.el: Optimize how tags are checked for use.
* byte-opt.el: (byte-optimize-lapcode): Return nil instantly on
finding the tag in a jump table.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 9412ce3b26d..c774d26c04b 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1730,10 +1730,9 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." ;; ((and (eq 'TAG (car lap0)) (not (rassq lap0 lap)) - (= (length (cl-loop for table in byte-compile-jump-tables - when (member lap0 (hash-table-values table)) - collect t)) - 0)) + (cl-loop for table in byte-compile-jump-tables + when (member lap0 (hash-table-values table)) + return nil finally return t)) (and (memq byte-optimize-log '(t byte)) (byte-compile-log " unused tag %d removed" (nth 1 lap0))) (setq lap (delq lap0 lap) |