Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -3223,7 +3223,8 @@ get_bb (TransformData *td, unsigned char *ip)
bb->index = td->bb_count++;
td->offset_to_bb [offset] = bb;

td->basic_blocks = g_list_append_mempool (td->mempool, td->basic_blocks, bb);
/* Add the blocks in reverse order */
td->basic_blocks = g_list_prepend_mempool (td->mempool, td->basic_blocks, bb);
}

return bb;
Expand Down Expand Up @@ -3320,6 +3321,9 @@ get_basic_blocks (TransformData *td, MonoMethodHeader *header)
if (i == CEE_THROW || i == CEE_ENDFINALLY || i == CEE_RETHROW)
get_bb (td, ip);
}

/* get_bb added blocks in reverse order, unreverse now */
td->basic_blocks = g_list_reverse (td->basic_blocks);
}

static void
Expand Down