aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-06-12 05:06:37 +0000
committerStefan Monnier2000-06-12 05:06:37 +0000
commit72d8b544c6eff21e8d5aad013a31fbfc1979a4d0 (patch)
treebab1ac59fe35df15a76b23aaee46f7ace04a7afd
parent571b4b9325428d9c3a443932eaf4f3860e6f02d1 (diff)
downloademacs-72d8b544c6eff21e8d5aad013a31fbfc1979a4d0.tar.gz
emacs-72d8b544c6eff21e8d5aad013a31fbfc1979a4d0.zip
(byte-compile-log-lap-1)
(byte-optimize-inline-handler, byte-optimize-form-code-walker) (byte-optimize-apply, end of file): Don't quote lambda.
-rw-r--r--lisp/emacs-lisp/byte-opt.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 04125e65be0..e1cc0db3f36 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -38,7 +38,7 @@
38 38
39;; TO DO: 39;; TO DO:
40;; 40;;
41;; (apply '(lambda (x &rest y) ...) 1 (foo)) 41;; (apply (lambda (x &rest y) ...) 1 (foo))
42;; 42;;
43;; maintain a list of functions known not to access any global variables 43;; maintain a list of functions known not to access any global variables
44;; (actually, give them a 'dynamically-safe property) and then 44;; (actually, give them a 'dynamically-safe property) and then
@@ -192,7 +192,7 @@
192 (byte-compile-log-1 192 (byte-compile-log-1
193 (apply 'format format 193 (apply 'format format
194 (let (c a) 194 (let (c a)
195 (mapcar '(lambda (arg) 195 (mapcar (lambda (arg)
196 (if (not (consp arg)) 196 (if (not (consp arg))
197 (if (and (symbolp arg) 197 (if (and (symbolp arg)
198 (string-match "^byte-" (symbol-name arg))) 198 (string-match "^byte-" (symbol-name arg)))
@@ -232,7 +232,7 @@
232 "byte-optimize-handler for the `inline' special-form." 232 "byte-optimize-handler for the `inline' special-form."
233 (cons 'progn 233 (cons 'progn
234 (mapcar 234 (mapcar
235 '(lambda (sexp) 235 (lambda (sexp)
236 (let ((fn (car-safe sexp))) 236 (let ((fn (car-safe sexp)))
237 (if (and (symbolp fn) 237 (if (and (symbolp fn)
238 (or (cdr (assq fn byte-compile-function-environment)) 238 (or (cdr (assq fn byte-compile-function-environment))
@@ -385,7 +385,7 @@
385 ;; are more deeply nested are optimized first. 385 ;; are more deeply nested are optimized first.
386 (cons fn 386 (cons fn
387 (cons 387 (cons
388 (mapcar '(lambda (binding) 388 (mapcar (lambda (binding)
389 (if (symbolp binding) 389 (if (symbolp binding)
390 binding 390 binding
391 (if (cdr (cdr binding)) 391 (if (cdr (cdr binding))
@@ -397,7 +397,7 @@
397 (byte-optimize-body (cdr (cdr form)) for-effect)))) 397 (byte-optimize-body (cdr (cdr form)) for-effect))))
398 ((eq fn 'cond) 398 ((eq fn 'cond)
399 (cons fn 399 (cons fn
400 (mapcar '(lambda (clause) 400 (mapcar (lambda (clause)
401 (if (consp clause) 401 (if (consp clause)
402 (cons 402 (cons
403 (byte-optimize-form (car clause) nil) 403 (byte-optimize-form (car clause) nil)
@@ -1025,8 +1025,8 @@
1025 1025
1026 1026
1027(defun byte-optimize-funcall (form) 1027(defun byte-optimize-funcall (form)
1028 ;; (funcall '(lambda ...) ...) ==> ((lambda ...) ...) 1028 ;; (funcall (lambda ...) ...) ==> ((lambda ...) ...)
1029 ;; (funcall 'foo ...) ==> (foo ...) 1029 ;; (funcall foo ...) ==> (foo ...)
1030 (let ((fn (nth 1 form))) 1030 (let ((fn (nth 1 form)))
1031 (if (memq (car-safe fn) '(quote function)) 1031 (if (memq (car-safe fn) '(quote function))
1032 (cons (nth 1 fn) (cdr (cdr form))) 1032 (cons (nth 1 fn) (cdr (cdr form)))
@@ -1042,7 +1042,7 @@
1042 (if (listp (nth 1 last)) 1042 (if (listp (nth 1 last))
1043 (let ((butlast (nreverse (cdr (reverse (cdr (cdr form))))))) 1043 (let ((butlast (nreverse (cdr (reverse (cdr (cdr form)))))))
1044 (nconc (list 'funcall fn) butlast 1044 (nconc (list 'funcall fn) butlast
1045 (mapcar '(lambda (x) (list 'quote x)) (nth 1 last)))) 1045 (mapcar (lambda (x) (list 'quote x)) (nth 1 last))))
1046 (byte-compile-warn 1046 (byte-compile-warn
1047 "Last arg to apply can't be a literal atom: `%s'" 1047 "Last arg to apply can't be a literal atom: `%s'"
1048 (prin1-to-string last)) 1048 (prin1-to-string last))
@@ -1933,10 +1933,10 @@
1933 (assq 'byte-code (symbol-function 'byte-optimize-form)) 1933 (assq 'byte-code (symbol-function 'byte-optimize-form))
1934 (let ((byte-optimize nil) 1934 (let ((byte-optimize nil)
1935 (byte-compile-warnings nil)) 1935 (byte-compile-warnings nil))
1936 (mapcar '(lambda (x) 1936 (mapcar (lambda (x)
1937 (or noninteractive (message "compiling %s..." x)) 1937 (or noninteractive (message "compiling %s..." x))
1938 (byte-compile x) 1938 (byte-compile x)
1939 (or noninteractive (message "compiling %s...done" x))) 1939 (or noninteractive (message "compiling %s...done" x)))
1940 '(byte-optimize-form 1940 '(byte-optimize-form
1941 byte-optimize-body 1941 byte-optimize-body
1942 byte-optimize-predicate 1942 byte-optimize-predicate