emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/byte-opt.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/byte-opt.el,v
Date: Fri, 06 Apr 2007 18:22:23 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      07/04/06 18:22:23

Index: byte-opt.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/byte-opt.el,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -b -r1.89 -r1.90
--- byte-opt.el 5 Apr 2007 17:57:05 -0000       1.89
+++ byte-opt.el 6 Apr 2007 18:22:23 -0000       1.90
@@ -1118,27 +1118,6 @@
        (byte-optimize-predicate form))
     form))
 
-(put 'concat 'byte-optimizer 'byte-optimize-pure-func)
-(put 'symbol-name 'byte-optimizer 'byte-optimize-pure-func)
-(put 'regexp-opt 'byte-optimizer 'byte-optimize-pure-func)
-(put 'regexp-quote 'byte-optimizer 'byte-optimize-pure-func)
-(put 'string-to-syntax 'byte-optimizer 'byte-optimize-pure-func)
-(defun byte-optimize-pure-func (form)
-  "Do constant folding for pure functions.
-This assumes that the function will not have any side-effects and that
-its return value depends solely on its arguments.
-If the function can signal an error, this might change the semantics
-of FORM by signaling the error at compile-time."
-  (let ((args (cdr form))
-       (constant t))
-    (while (and args constant)
-      (or (byte-compile-constp (car args))
-         (setq constant nil))
-      (setq args (cdr args)))
-    (if constant
-       (list 'quote (eval form))
-      form)))
-
 ;; Avoid having to write forward-... with a negative arg for speed.
 ;; Fixme: don't be limited to constant args.
 (put 'backward-char 'byte-optimizer 'byte-optimize-backward-char)




reply via email to

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