aboutsummaryrefslogtreecommitdiff
path: root/src/checker/stmt.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2016-10-03 23:28:37 +0100
committerGinger Bill <bill@gingerbill.org>2016-10-03 23:28:37 +0100
commitfee504636f9cd7633217e1877ee1b99e555bba63 (patch)
tree5e5150802c7c87ba82e77f2516bb7d746355dec6 /src/checker/stmt.cpp
parentf6589d9814e2e26bee9b7941a23b4bef68582f2f (diff)
Code clean up of call arguments
Diffstat (limited to 'src/checker/stmt.cpp')
-rw-r--r--src/checker/stmt.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/checker/stmt.cpp b/src/checker/stmt.cpp
index 88fb32b4c..0ca457c9a 100644
--- a/src/checker/stmt.cpp
+++ b/src/checker/stmt.cpp
@@ -11,8 +11,6 @@ void check_stmt(Checker *c, AstNode *node, u32 flags);
void check_proc_decl(Checker *c, Entity *e, DeclInfo *d);
void check_stmt_list(Checker *c, AstNodeArray stmts, u32 flags) {
- // TODO(bill): Allow declaration (expect variable) in any order
- // even within a procedure
struct Delay {
Entity *e;
DeclInfo *d;
@@ -57,7 +55,6 @@ void check_stmt_list(Checker *c, AstNodeArray stmts, u32 flags) {
case_ast_node(td, TypeDecl, node);
Entity *e = make_entity_type_name(c->allocator, c->context.scope, td->name->Ident, NULL);
e->identifier = td->name;
- add_entity(c, c->context.scope, td->name, e);
DeclInfo *d = make_declaration_info(c->allocator, e->scope);
d->type_expr = td->type;
@@ -339,7 +336,7 @@ void check_init_variables(Checker *c, Entity **lhs, isize lhs_count, AstNodeArra
// TODO(bill): Do not use heap allocation here if I can help it
gbArray(Operand) operands;
- gb_array_init(operands, gb_heap_allocator());
+ gb_array_init_reserve(operands, gb_heap_allocator(), 2*lhs_count);
defer (gb_array_free(operands));
gb_for_array(i, inits) {