| Index: src/address-map.cc
|
| diff --git a/src/address-map.cc b/src/address-map.cc
|
| index 3122b33693488e5e27c1e36881d89d8fa7fc9b1e..add832b3798a026ad8654c7802172d02a892e82b 100644
|
| --- a/src/address-map.cc
|
| +++ b/src/address-map.cc
|
| @@ -13,7 +13,7 @@ namespace internal {
|
| RootIndexMap::RootIndexMap(Isolate* isolate) {
|
| map_ = isolate->root_index_map();
|
| if (map_ != NULL) return;
|
| - map_ = new base::HashMap();
|
| + map_ = new HeapObjectToIndexHashMap();
|
| for (uint32_t i = 0; i < Heap::kStrongRootListLength; i++) {
|
| Heap::RootListIndex root_index = static_cast<Heap::RootListIndex>(i);
|
| Object* root = isolate->heap()->root(root_index);
|
| @@ -22,12 +22,11 @@ RootIndexMap::RootIndexMap(Isolate* isolate) {
|
| // not be referenced through the root list in the snapshot.
|
| if (isolate->heap()->RootCanBeTreatedAsConstant(root_index)) {
|
| HeapObject* heap_object = HeapObject::cast(root);
|
| - base::HashMap::Entry* entry = LookupEntry(map_, heap_object, false);
|
| - if (entry != NULL) {
|
| + if (map_->Has(heap_object)) {
|
| // Some are initialized to a previous value in the root list.
|
| - DCHECK_LT(GetValue(entry), i);
|
| + DCHECK_LT(map_->Get(heap_object), i);
|
| } else {
|
| - SetValue(LookupEntry(map_, heap_object, true), i);
|
| + map_->Set(heap_object, i);
|
| }
|
| } else {
|
| // Immortal immovable root objects are constant and allocated on the first
|
|
|