unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* optimizing defconst
@ 2007-10-27 17:47 Dan Nicolaescu
  2007-10-27 20:32 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Dan Nicolaescu @ 2007-10-27 17:47 UTC (permalink / raw)
  To: emacs-devel


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?

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-10-30  2:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-27 17:47 optimizing defconst Dan Nicolaescu
2007-10-27 20:32 ` 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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).