| Index: src/ast/scopes.cc
|
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
|
| index ce65627d7d2edb4f723fd3cb1b696680224cbd6e..eb92cefb98f055f12081c00611624944e361c26a 100644
|
| --- a/src/ast/scopes.cc
|
| +++ b/src/ast/scopes.cc
|
| @@ -1594,17 +1594,15 @@ void DeclarationScope::AllocateLocals() {
|
| }
|
|
|
| void ModuleScope::AllocateModuleVariables() {
|
| - for (auto it = module()->regular_imports().begin();
|
| - it != module()->regular_imports().end(); ++it) {
|
| - Variable* var = LookupLocal(it->second->local_name);
|
| + for (const auto& it : module()->regular_imports()) {
|
| + Variable* var = LookupLocal(it.first);
|
| // TODO(neis): Use a meaningful index.
|
| var->AllocateTo(VariableLocation::MODULE, 42);
|
| }
|
|
|
| - for (auto entry : module()->exports()) {
|
| - if (entry->local_name == nullptr) continue;
|
| - Variable* var = LookupLocal(entry->local_name);
|
| - var->AllocateTo(VariableLocation::MODULE, 42);
|
| + for (const auto& it : module()->regular_exports()) {
|
| + Variable* var = LookupLocal(it.first);
|
| + var->AllocateTo(VariableLocation::MODULE, 0);
|
| }
|
| }
|
|
|
|
|