Index: src/snapshot/partial-serializer.h |
diff --git a/src/snapshot/partial-serializer.h b/src/snapshot/partial-serializer.h |
index 1d4ce2ba20d4b1f5584c9e987bba2cdbf6b19a41..282f76e78fdb69422ba8495bfdbbbc32a6635861 100644 |
--- a/src/snapshot/partial-serializer.h |
+++ b/src/snapshot/partial-serializer.h |
@@ -11,9 +11,11 @@ |
namespace v8 { |
namespace internal { |
+class StartupSerializer; |
+ |
class PartialSerializer : public Serializer { |
public: |
- PartialSerializer(Isolate* isolate, Serializer* startup_snapshot_serializer); |
+ PartialSerializer(Isolate* isolate, StartupSerializer* startup_serializer); |
~PartialSerializer() override; |
@@ -21,36 +23,12 @@ class PartialSerializer : public Serializer { |
void Serialize(Object** o); |
private: |
- class PartialCacheIndexMap : public AddressMapBase { |
- public: |
- PartialCacheIndexMap() : map_(base::HashMap::PointersMatch) {} |
- |
- static const int kInvalidIndex = -1; |
- |
- // Lookup object in the map. Return its index if found, or create |
- // a new entry with new_index as value, and return kInvalidIndex. |
- int LookupOrInsert(HeapObject* obj, int new_index) { |
- base::HashMap::Entry* entry = LookupEntry(&map_, obj, false); |
- if (entry != NULL) return GetValue(entry); |
- SetValue(LookupEntry(&map_, obj, true), static_cast<uint32_t>(new_index)); |
- return kInvalidIndex; |
- } |
- |
- private: |
- base::HashMap map_; |
- |
- DISALLOW_COPY_AND_ASSIGN(PartialCacheIndexMap); |
- }; |
- |
void SerializeObject(HeapObject* o, HowToCode how_to_code, |
WhereToPoint where_to_point, int skip) override; |
- int PartialSnapshotCacheIndex(HeapObject* o); |
bool ShouldBeInThePartialSnapshotCache(HeapObject* o); |
- Serializer* startup_serializer_; |
- PartialCacheIndexMap partial_cache_index_map_; |
- int next_partial_cache_index_; |
+ StartupSerializer* startup_serializer_; |
DISALLOW_COPY_AND_ASSIGN(PartialSerializer); |
}; |