]> git.eshelyaron.com Git - emacs.git/commitdiff
strengthening comp-compute-edges
authorAndrea Corallo <akrl@sdf.org>
Sat, 21 Sep 2019 17:13:11 +0000 (19:13 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:37:51 +0000 (11:37 +0100)
lisp/emacs-lisp/comp.el

index 83e8f8485b0a91ce6f416c3052572619dfffba94..01edd2b18fe7bf739fa093fc812a03e73a0a19a7 100644 (file)
@@ -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)))