projects
/
cacao.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf36271
)
* src/vm/jit/cfg.c (cfg_build): Fixed off by one in predecessorcount for exception...
author
Peter Molnar
<pm@complang.tuwien.ac.at>
Sat, 22 Mar 2008 13:51:30 +0000
(14:51 +0100)
committer
Peter Molnar
<pm@complang.tuwien.ac.at>
Sat, 22 Mar 2008 13:51:30 +0000
(14:51 +0100)
src/vm/jit/cfg.c
patch
|
blob
|
history
diff --git
a/src/vm/jit/cfg.c
b/src/vm/jit/cfg.c
index 55832e8d3f9ed2fe5f5ff4efbd1d9465e7417d7a..9cc8260996b94c8d72d0c5268c50dcb6c524a5f1 100644
(file)
--- a/
src/vm/jit/cfg.c
+++ b/
src/vm/jit/cfg.c
@@
-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;