Fix type info generation

The problem: entry's index != entry->value in info_type_map
But I was assuming this
This commit is contained in:
Ginger Bill
2016-09-22 13:34:14 +01:00
parent 664c2cd7a5
commit 6907951f1e
7 changed files with 119 additions and 51 deletions

View File

@@ -302,9 +302,12 @@ void ssa_gen_tree(ssaGen *s) {
};
gb_for_array(entry_index, info->type_info_map.entries) {
auto *entry = &info->type_info_map.entries[entry_index];
gb_for_array(type_info_map_index, info->type_info_map.entries) {
auto *entry = &info->type_info_map.entries[type_info_map_index];
Type *t = cast(Type *)cast(uintptr)entry->key.key;
t = default_type(t);
isize entry_index = entry->value;
ssaValue *tag = NULL;