Allow .allocator for dynamic arrays; Add mem.Pool

This commit is contained in:
gingerBill
2018-06-12 19:10:14 +01:00
parent 915dcb0c28
commit e9e7ce2606
8 changed files with 253 additions and 142 deletions

View File

@@ -2648,6 +2648,9 @@ Entity *check_selector(CheckerContext *c, Operand *operand, AstNode *node, Type
if (entity == nullptr && selector->kind == AstNode_Ident) {
String field_name = selector->Ident.token.string;
if (is_type_dynamic_array(type_deref(operand->type))) {
init_mem_allocator(c->checker);
}
sel = lookup_field(operand->type, field_name, operand->mode == Addressing_Type);
entity = sel.entity;