aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-07-16 18:02:07 +0000
committerRichard M. Stallman2005-07-16 18:02:07 +0000
commit8877fa6fb302a09353e675dea42b40e85e48eeb2 (patch)
tree408ecf25466896ed1b85bb35c9b978471d0acd0f
parent3c54e8f13680d43191ce274d5a71145fb8a89d01 (diff)
downloademacs-8877fa6fb302a09353e675dea42b40e85e48eeb2.tar.gz
emacs-8877fa6fb302a09353e675dea42b40e85e48eeb2.zip
(byte-compile-and-recursion): New function.
(byte-compile-and): Use byte-compile-and-recursion.
-rw-r--r--lisp/emacs-lisp/bytecomp.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 36ce227df91..15549ea039f 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -3448,12 +3448,19 @@ warnings during execution of BODY."
3448 (args (cdr form))) 3448 (args (cdr form)))
3449 (if (null args) 3449 (if (null args)
3450 (byte-compile-form-do-effect t) 3450 (byte-compile-form-do-effect t)
3451 (while (cdr args) 3451 (byte-compile-and-recursion args failtag))))
3452 (byte-compile-form (car args)) 3452
3453;; Handle compilation of a multi-argument `and' call.
3454;; We use tail recursion so we can use byte-compile-maybe-guarded.
3455(defun byte-compile-and-recursion (rest failtag)
3456 (if (cdr rest)
3457 (progn
3458 (byte-compile-form (car rest))
3453 (byte-compile-goto-if nil for-effect failtag) 3459 (byte-compile-goto-if nil for-effect failtag)
3454 (setq args (cdr args))) 3460 (byte-compile-maybe-guarded (car rest)
3455 (byte-compile-form-do-effect (car args)) 3461 (byte-compile-and-recursion (cdr rest) failtag)))
3456 (byte-compile-out-tag failtag)))) 3462 (byte-compile-form-do-effect (car rest))
3463 (byte-compile-out-tag failtag)))
3457 3464
3458(defun byte-compile-or (form) 3465(defun byte-compile-or (form)
3459 (let ((wintag (byte-compile-make-tag)) 3466 (let ((wintag (byte-compile-make-tag))