diff options
author | Pip Cet <pipcet@gmail.com> | 2022-06-20 01:59:49 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-20 01:59:49 +0200 |
commit | 3947037a33540fa879e5465ae25b9aec61511f85 (patch) | |
tree | b68d8f0fcf9e5be4696cff643340c4120fa01e55 /lisp/emacs-lisp | |
parent | efc241f4020478122d506b3d42a815ad47f7910b (diff) | |
download | emacs-3947037a33540fa879e5465ae25b9aec61511f85.tar.gz emacs-3947037a33540fa879e5465ae25b9aec61511f85.tar.bz2 emacs-3947037a33540fa879e5465ae25b9aec61511f85.zip |
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).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/byte-opt.el | 6 |
1 files changed, 3 insertions, 3 deletions
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) |