* 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.
This commit is contained in:
parent
8c0f326ea2
commit
309b46420e
1 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue