From: Andrea Corallo Date: Sun, 8 Sep 2019 19:42:51 +0000 (+0200) Subject: do not override existing basic blocks when branching backwards! X-Git-Tag: emacs-28.0.90~2727^2~1188 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c702e25a7a9e1ba2b75942dcc00402947757786d;p=emacs.git do not override existing basic blocks when branching backwards! --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 0770d32f7a1..c398810186d 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -500,9 +500,11 @@ If NEGATED non nil negate the tested condition." (comp-emit (if negated (list 'cond-jump a b target bb) (list 'cond-jump a b bb target))) - (puthash target - (make-comp-block :sp (+ target-offset (comp-sp))) - blocks) + (unless (gethash target blocks) + ;; Create the bb target only if does not exixsts already. + (puthash target + (make-comp-block :sp (+ target-offset (comp-sp))) + blocks)) (comp-mark-block-closed)) (comp-emit-block bb)))