all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
Cc: Vibhav Pant <vibhavp@gmail.com>
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	[thread overview]
Message-ID: <jwvo9yg65av.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <20170205102302.97A0822014A@vcs.savannah.gnu.org> (Vibhav Pant's message of "Sun,  5 Feb 2017 10:23:02 +0000 (UTC)")

>  (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	other threads:[~2017-02-05 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170205102302.10649.95044@vcs.savannah.gnu.org>
     [not found] ` <20170205102302.97A0822014A@vcs.savannah.gnu.org>
2017-02-05 15:14   ` Stefan Monnier [this message]
2017-02-05 17:24     ` [Emacs-diffs] feature/byte-switch 44c95c5: bytecomp.el: Don't store non-keyword symbols in jump-tables Vibhav Pant
2017-02-05 17:50       ` Clément Pit-Claudel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvo9yg65av.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=vibhavp@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.