Change union layout to store type info rather than an integer; ternary expression for types with constant condition

This commit is contained in:
Ginger Bill
2017-07-19 12:15:21 +01:00
parent 4db462a703
commit 6113164211
9 changed files with 222 additions and 85 deletions
+2 -1
View File
@@ -82,7 +82,8 @@ TypeInfo :: struct #ordered {
Struct :: Record;
RawUnion :: Record;
Union :: struct #ordered {
variants: []^TypeInfo;
variants: []^TypeInfo;
tag_offset: int;
};
Enum :: struct #ordered {
base: ^TypeInfo;