windows.odin TYPE_NAME to Type_Name; More SSA work and SSA printing for debugging

This commit is contained in:
Ginger Bill
2017-03-12 16:42:51 +00:00
parent 0fcbda951a
commit aaec8bf423
14 changed files with 1653 additions and 583 deletions
+11
View File
@@ -13,6 +13,7 @@ typedef struct Type Type;
ENTITY_KIND(Builtin) \
ENTITY_KIND(ImportName) \
ENTITY_KIND(LibraryName) \
ENTITY_KIND(Alias) \
ENTITY_KIND(Nil) \
ENTITY_KIND(Count)
@@ -95,6 +96,9 @@ struct Entity {
String name;
bool used;
} LibraryName;
struct {
Entity *original;
} Alias;
i32 Nil;
};
};
@@ -218,6 +222,13 @@ Entity *make_entity_library_name(gbAllocator a, Scope *scope, Token token, Type
return entity;
}
Entity *make_entity_alias(gbAllocator a, Scope *scope, Token token, Type *type,
Entity *original) {
Entity *entity = alloc_entity(a, Entity_Alias, scope, token, type);
entity->Alias.original = original;
return entity;
}
Entity *make_entity_nil(gbAllocator a, String name, Type *type) {
Token token = make_token_ident(name);
Entity *entity = alloc_entity(a, Entity_Nil, NULL, token, type);