From be1b64bdb515d8328228138982850475d15a0feb Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sat, 21 Sep 2019 19:13:11 +0200 Subject: [PATCH] strengthening comp-compute-edges --- lisp/emacs-lisp/comp.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 83e8f8485b0..01edd2b18fe 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -995,7 +995,7 @@ Top level forms for the current context are rendered too." for bb being each hash-value of blocks for last-insn = (car (last (comp-block-insns bb))) for (op first second third forth) = last-insn - do (cl-ecase op + do (cl-case op (jump (edge-add :src bb :dst (gethash first blocks))) (cond-jump @@ -1007,7 +1007,10 @@ Top level forms for the current context are rendered too." (push-handler (edge-add :src bb :dst (gethash third blocks)) (edge-add :src bb :dst (gethash forth blocks))) - (return)) + (return) + (otherwise + (error "Block %s does not end with a branch in func %s" + bb (comp-func-symbol-name comp-func)))) finally (progn (setf (comp-func-edges comp-func) (nreverse (comp-func-edges comp-func))) -- 2.39.5