diff options
Diffstat (limited to 'src/analysis/disass/rank.c')
-rw-r--r-- | src/analysis/disass/rank.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/analysis/disass/rank.c b/src/analysis/disass/rank.c index b6eb4c5..d703aee 100644 --- a/src/analysis/disass/rank.c +++ b/src/analysis/disass/rank.c @@ -50,19 +50,19 @@ void rank_routine_block(const GBlockList *list, GCodeBlock *block) { size_t next; /* Rang suivant obtenu */ size_t dcount; /* Nombre de liens de dest. */ + block_link_t *links; /* Liens associés au bloc */ size_t i; /* Boucle de parcours */ - const block_link_t *dest; /* Instr. visée par une autre */ + block_link_t *dest; /* Bloc visé par un autre */ InstructionLinkType type; /* Raccourci pour confort */ unsigned int rank; /* Rang à constituer */ next = g_code_block_get_rank(block) + 1; - g_code_block_lock_dest(block); - dcount = g_code_block_count_destinations(block); + links = g_code_block_get_destinations(block, &dcount); for (i = 0; i < dcount; i++) { - dest = g_code_block_get_destination(block, i); + dest = &links[i]; type = dest->type; @@ -93,11 +93,12 @@ void rank_routine_block(const GBlockList *list, GCodeBlock *block) next_dest: - unref_instr_link(dest); + unref_block_link(dest); } - g_code_block_unlock_dest(block); + if (links != NULL) + free(links); } |