bytecomp.el: Don't store non-keyword symbols in jump-tables.
* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-valid-obj2-p) return nil when OBJ is a non-keyword symbol (i.e a variable), as the jump table can only be used when comparing variables with constant values.
This commit is contained in:
parent
de456d1e4a
commit
44c95c58b2
1 changed files with 7 additions and 5 deletions
|
@ -3971,11 +3971,13 @@ that suppresses all warnings during execution of BODY."
|
|||
(setq byte-compile--for-effect nil))
|
||||
|
||||
(defun byte-compile-cond-valid-obj2-p (obj)
|
||||
(if (consp obj)
|
||||
(and (eq (car obj) 'quote)
|
||||
(= (length obj) 2)
|
||||
(symbolp (cadr obj)))
|
||||
t))
|
||||
(cond
|
||||
((consp obj)
|
||||
(and (eq (car obj) 'quote)
|
||||
(= (length obj) 2)
|
||||
(symbolp (cadr obj))))
|
||||
((symbolp obj) (keywordp obj))
|
||||
(t t)))
|
||||
|
||||
(defun byte-compile-cond-vars (obj1 obj2)
|
||||
(or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue