From aa542980cea146e05cf9bb5f1d792e1f092328ae Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 30 Aug 2018 19:14:10 +0100 Subject: Change memory layout of `map` to be 3 words smaller --- src/checker.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/checker.cpp') diff --git a/src/checker.cpp b/src/checker.cpp index 5299e4372..a7b54fb8a 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -905,11 +905,14 @@ void add_entity_and_decl_info(CheckerContext *c, Ast *identifier, Entity *e, Dec if (e->scope != nullptr) { Scope *scope = e->scope; - if ((scope->flags&ScopeFlag_File) && is_entity_kind_exported(e->kind)) { - AstPackage *pkg = scope->file->pkg; - GB_ASSERT(pkg->scope == scope->parent); - GB_ASSERT(c->pkg == pkg); - scope = pkg->scope; + + if (scope->flags & ScopeFlag_File) { + if (is_entity_kind_exported(e->kind)) { + AstPackage *pkg = scope->file->pkg; + GB_ASSERT(pkg->scope == scope->parent); + GB_ASSERT(c->pkg == pkg); + scope = pkg->scope; + } } add_entity(c->checker, scope, identifier, e); } -- cgit v1.2.3