* src/vm/jit/jit.h (stackptr): Removed.
[cacao.git] / src / vm / jit / cfg.c
index 55832e8d3f9ed2fe5f5ff4efbd1d9465e7417d7a..9cc8260996b94c8d72d0c5268c50dcb6c524a5f1 100644 (file)
@@ -141,6 +141,13 @@ bool cfg_build(jitdata *jd)
        bptr = jd->basicblocks;
 
        for (bptr = jd->basicblocks; bptr != NULL; bptr = bptr->next) {
+
+               if (bptr->type == BBTYPE_EXH) {
+                       /* predecessorcount for exception handlers is initialized to -1,
+                          so we need to fix it to 0. */
+                       bptr->predecessorcount += 1;
+               }
+
                if ((bptr->icount == 0) || (bptr->flags == BBUNDEF))
                        continue;