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

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

Issue 2052433003: [snapshot] make snapshot sink a non-dynamic member of the serializer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@noref
Patch Set: rebase 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/snapshot/partial-serializer.h ('k') | src/snapshot/serializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/partial-serializer.cc
diff --git a/src/snapshot/partial-serializer.cc b/src/snapshot/partial-serializer.cc
index fc25191395cb9e363976ba2a8b3ed59edd270057..7347995881b7ad14bc58d19875eb5cf123e11b1f 100644
--- a/src/snapshot/partial-serializer.cc
+++ b/src/snapshot/partial-serializer.cc
@@ -10,9 +10,8 @@ namespace v8 {
namespace internal {
PartialSerializer::PartialSerializer(Isolate* isolate,
- Serializer* startup_snapshot_serializer,
- SnapshotByteSink* sink)
- : Serializer(isolate, sink),
+ Serializer* startup_snapshot_serializer)
+ : Serializer(isolate),
startup_serializer_(startup_snapshot_serializer),
next_partial_cache_index_(0) {
InitializeCodeAddressMap();
@@ -63,9 +62,9 @@ void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
FlushSkip(skip);
int cache_index = PartialSnapshotCacheIndex(obj);
- sink_->Put(kPartialSnapshotCache + how_to_code + where_to_point,
- "PartialSnapshotCache");
- sink_->PutInt(cache_index, "partial_snapshot_cache_index");
+ sink_.Put(kPartialSnapshotCache + how_to_code + where_to_point,
+ "PartialSnapshotCache");
+ sink_.PutInt(cache_index, "partial_snapshot_cache_index");
return;
}
@@ -90,7 +89,7 @@ void PartialSerializer::SerializeObject(HeapObject* obj, HowToCode how_to_code,
}
// Object has not yet been serialized. Serialize it here.
- ObjectSerializer serializer(this, obj, sink_, how_to_code, where_to_point);
+ ObjectSerializer serializer(this, obj, &sink_, how_to_code, where_to_point);
serializer.Serialize();
}
« no previous file with comments | « src/snapshot/partial-serializer.h ('k') | src/snapshot/serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698