diff options
| author | gingerBill <bill@gingerbill.org> | 2018-08-30 19:14:10 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-08-30 19:14:10 +0100 |
| commit | aa542980cea146e05cf9bb5f1d792e1f092328ae (patch) | |
| tree | eea45538d6934f0c669a5bf218396d2ce6294098 /src/checker.cpp | |
| parent | e0240c186f2939f39f2051c5123b8b75e5fdb184 (diff) | |
Change memory layout of `map` to be 3 words smaller
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
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); } |