Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1422)

Unified Diff: src/snapshot/partial-serializer.h

Issue 2055203002: [snapshot] support multiple contexts in the same snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@sinkmember
Patch Set: fix test. again. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug/debug.cc ('k') | src/snapshot/partial-serializer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « src/debug/debug.cc ('k') | src/snapshot/partial-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698