Reduce excessive node cloning on para-poly checking and fix scope bug

This commit is contained in:
Ginger Bill
2017-06-26 14:39:51 +01:00
parent cc7316bb35
commit d974b29f67
3 changed files with 24 additions and 13 deletions
+3 -3
View File
@@ -387,9 +387,9 @@ Scope *make_scope(Scope *parent, gbAllocator allocator) {
Scope *s = gb_alloc_item(allocator, Scope);
s->parent = parent;
map_init(&s->elements, heap_allocator());
map_init(&s->implicit, heap_allocator());
array_init(&s->shared, heap_allocator());
array_init(&s->imported, heap_allocator());
map_init(&s->implicit, heap_allocator());
array_init(&s->shared, heap_allocator());
array_init(&s->imported, heap_allocator());
if (parent != NULL && parent != universal_scope) {
DLIST_APPEND(parent->first_child, parent->last_child, s);