From: Pip Cet Date: Sun, 19 Jun 2022 23:59:49 +0000 (+0200) Subject: Fix bytecompiler infloop compiling infloops X-Git-Tag: emacs-29.0.90~1447^2~1603 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3947037a33540fa879e5465ae25b9aec61511f85;p=emacs.git Fix bytecompiler infloop compiling infloops * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Don't apply optimization if we can't change anything (bug#46906). --- diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index fc49e88f8ee..1a50c5a43af 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -2060,9 +2060,9 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." ((and (memq (car lap0) byte-goto-ops) (memq (car (setq tmp (nth 1 (memq (cdr lap0) lap)))) '(byte-goto byte-return))) - (cond ((and (not (eq tmp lap0)) - (or (eq (car lap0) 'byte-goto) - (eq (car tmp) 'byte-goto))) + (cond ((and (or (eq (car lap0) 'byte-goto) + (eq (car tmp) 'byte-goto)) + (not (eq (cdr tmp) (cdr lap0)))) (byte-compile-log-lap " %s [%s]\t-->\t%s" (car lap0) tmp tmp) (if (eq (car tmp) 'byte-return)