1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

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).
This commit is contained in:
Pip Cet 2022-06-20 01:59:49 +02:00 committed by Lars Ingebrigtsen
parent efc241f402
commit 3947037a33

View file

@ -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)