Change memory layout of map to be 3 words smaller

This commit is contained in:
gingerBill
2018-08-30 19:14:10 +01:00
parent e0240c186f
commit aa542980ce
12 changed files with 114 additions and 44 deletions

View File

@@ -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);
}