Index: src/modules.cc |
diff --git a/src/modules.cc b/src/modules.cc |
index eb01cf08e49bc9e6714f5a3ce725fce108f8d3f2..5fab34dcbd30c43adc2ba20e4f61ec11d805b43f 100644 |
--- a/src/modules.cc |
+++ b/src/modules.cc |
@@ -11,28 +11,27 @@ |
namespace v8 { |
namespace internal { |
-// --------------------------------------------------------------------------- |
-// Addition. |
-void ModuleDescriptor::Add(const AstRawString* name, Zone* zone, bool* ok) { |
- void* key = const_cast<AstRawString*>(name); |
+void ModuleDescriptor::AddLocalExport(const AstRawString* export_name, |
+ const AstRawString* local_name, |
+ Zone* zone, bool* ok) { |
+ void* key = const_cast<AstRawString*>(export_name); |
- ZoneHashMap** map = &exports_; |
ZoneAllocationPolicy allocator(zone); |
- if (*map == nullptr) { |
- *map = new (zone->New(sizeof(ZoneHashMap))) |
+ if (exports_ == nullptr) { |
+ exports_ = new (zone->New(sizeof(ZoneHashMap))) |
ZoneHashMap(ZoneHashMap::PointersMatch, |
ZoneHashMap::kDefaultHashMapCapacity, allocator); |
} |
ZoneHashMap::Entry* p = |
- (*map)->Lookup(key, name->hash(), !IsFrozen(), allocator); |
+ exports_->Lookup(key, export_name->hash(), !IsFrozen(), allocator); |
if (p == nullptr || p->value != nullptr) { |
*ok = false; |
} |
- p->value = key; |
+ p->value = const_cast<AstRawString*>(local_name); |
} |
} |
} // namespace v8::internal |