| Index: src/ast/scopes.cc
|
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
|
| index 2a41c7d47a2c1a458422e4f1225b24bd080b8567..6efeeb5f51522675073cb4da27d726ebc5eb9e6e 100644
|
| --- a/src/ast/scopes.cc
|
| +++ b/src/ast/scopes.cc
|
| @@ -1599,17 +1599,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);
|
| }
|
| }
|
|
|
|
|