diff options
| author | Richard M. Stallman <rms@gnu.org> | 2005-07-16 18:02:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 2005-07-16 18:02:07 +0000 |
| commit | ce1681e0ad59976c18c3aa909a7e327445567e58 (patch) | |
| tree | 0fe10e96d6e0615ac6e133f585fd9cce5408d663 /lisp/emacs-lisp/bytecomp.el | |
| parent | d39c101a3e3f4d698fc862061de20916918c369c (diff) | |
| download | emacs-ce1681e0ad59976c18c3aa909a7e327445567e58.tar.gz | |
(byte-compile-and-recursion): New function.
(byte-compile-and): Use byte-compile-and-recursion.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 17 |
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." (args (cdr form))) (if (null args) (byte-compile-form-do-effect t) - (while (cdr args) - (byte-compile-form (car args)) + (byte-compile-and-recursion args failtag)))) + +;; Handle compilation of a multi-argument `and' call. +;; We use tail recursion so we can use byte-compile-maybe-guarded. +(defun byte-compile-and-recursion (rest failtag) + (if (cdr rest) + (progn + (byte-compile-form (car rest)) (byte-compile-goto-if nil for-effect failtag) - (setq args (cdr args))) - (byte-compile-form-do-effect (car args)) - (byte-compile-out-tag failtag)))) + (byte-compile-maybe-guarded (car rest) + (byte-compile-and-recursion (cdr rest) failtag))) + (byte-compile-form-do-effect (car rest)) + (byte-compile-out-tag failtag))) (defun byte-compile-or (form) (let ((wintag (byte-compile-make-tag)) |
