diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2007-04-06 18:22:23 +0000 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2007-04-06 18:22:23 +0000 |
commit | c990483162bf4594c7f3741699e2d77e813f0d6f (patch) | |
tree | 4fd21ff15ee2dd05c58fa8bd10e51505b04616d1 /lisp/emacs-lisp | |
parent | 5d838629845a51091ad5f1088d82da1ec215ae3f (diff) | |
download | emacs-c990483162bf4594c7f3741699e2d77e813f0d6f.tar.gz emacs-c990483162bf4594c7f3741699e2d77e813f0d6f.tar.bz2 emacs-c990483162bf4594c7f3741699e2d77e813f0d6f.zip |
* emacs-lisp/byte-opt.el (byte-optimize-pure-func): Remove function
(originally checked in as byte-optimize-concat on 1997-11-02).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 61f7268adff..93d76c52076 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -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) |