From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: optimizing defconst
Date: Sat, 27 Oct 2007 10:47:26 -0700 [thread overview]
Message-ID: <200710271747.l9RHlQ53020242@oogie-boogie.ics.uci.edu> (raw)
Given this:
(defconst viper-xemacs-p (featurep 'xemacs))
(defun foo()
(if viper-xemacs-p (error "Hmmmm")))
Shouldn't `foo' be optimized to just do nothing?
It is not:
byte code for foo:
args: nil
0 varref viper-xemacs-p
1 goto-if-nil-else-pop 1
4 constant error
5 constant "Hmmmm"
6 call 1
7:1 return
Am I missing something?
next reply other threads:[~2007-10-27 17:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-27 17:47 Dan Nicolaescu [this message]
2007-10-27 20:32 ` optimizing defconst Stefan Monnier
2007-10-28 2:28 ` Dan Nicolaescu
2007-10-29 0:11 ` Richard Stallman
2007-10-29 10:46 ` Kim F. Storm
2007-10-29 11:08 ` Juanma Barranquero
2007-10-29 14:19 ` Johan Bockgård
2007-10-29 16:25 ` Davis Herring
2007-10-30 2:14 ` Richard Stallman
2007-10-27 20:44 ` John Paul Wallington
2007-10-27 21:17 ` Kim F. Storm
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=200710271747.l9RHlQ53020242@oogie-boogie.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
/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.