Commit e8f3c355 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(byte-optimize-form-code-walker):

Optimize the remaining part of for-effect and/or expressions.
parent 8b374c3f
...@@ -467,7 +467,7 @@ ...@@ -467,7 +467,7 @@
(byte-compile-log (byte-compile-log
" all subforms of %s called for effect; deleted" form)) " all subforms of %s called for effect; deleted" form))
(and backwards (and backwards
(cons fn (nreverse backwards)))) (cons fn (nreverse (mapcar 'byte-optimize-form backwards)))))
(cons fn (mapcar 'byte-optimize-form (cdr form))))) (cons fn (mapcar 'byte-optimize-form (cdr form)))))
((eq fn 'interactive) ((eq fn 'interactive)
...@@ -1159,6 +1159,8 @@ ...@@ -1159,6 +1159,8 @@
(put 'featurep 'byte-optimizer 'byte-optimize-featurep) (put 'featurep 'byte-optimizer 'byte-optimize-featurep)
(defun byte-optimize-featurep (form) (defun byte-optimize-featurep (form)
;; Emacs-21's byte-code doesn't run under XEmacs anyway, so we can
;; safely optimize away this test.
(if (equal '((quote xemacs)) (cdr-safe form)) (if (equal '((quote xemacs)) (cdr-safe form))
nil nil
form)) form))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment