mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-29 08:41:48 -07:00
windows.odin TYPE_NAME to Type_Name; More SSA work and SSA printing for debugging
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user