Subtyping Polymorphic arguments; using procedure parameters

This commit is contained in:
Ginger Bill
2016-08-30 23:32:04 +01:00
parent a06f70d5d9
commit cda0234d48
8 changed files with 438 additions and 319 deletions
+4 -4
View File
@@ -107,21 +107,21 @@ struct Type {
// Theses are arrays
Entity **fields; // Entity_Variable
isize field_count; // == offset_count
Entity **other_fields; // Entity_Constant or Entity_TypeName
isize other_field_count;
AstNode *node;
i64 * offsets;
b32 are_offsets_set;
b32 is_packed;
Entity **other_fields; // Entity_Constant or Entity_TypeName
isize other_field_count;
} Struct;
struct {
// IMPORTANT HACK(bill): The positions of fields, field_count, and node
// must be same for Struct and Union
Entity **fields; // Entity_Variable
isize field_count;
Entity **other_fields; // Entity_Constant or Entity_TypeName
isize other_field_count;
AstNode *node;
} Union;
struct { Type *elem; } Pointer;