emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] feature/byte-switch 44c95c5: bytecomp.el: Don't store


From: Stefan Monnier
Subject: Re: [Emacs-diffs] feature/byte-switch 44c95c5: bytecomp.el: Don't store non-keyword symbols in jump-tables.
Date: Sun, 05 Feb 2017 10:14:49 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>  (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)))

I suggest you document the property that you need this to satisfy.
E.g. something like "OBJ is a constant expression whose value can be
compared with `eq`" or something like that.  And you might like to see if
maybe you can use macroexp-const-p in here (there are many different
definitions of "constant", tho).


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]