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

Unified Diff: src/mksnapshot.cc

Issue 581223004: Support large objects in the serializer/deserializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/heap/spaces.cc ('k') | src/serialize.h » ('j') | src/serialize.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mksnapshot.cc
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc
index b4a40180a5081e1451338fe404cc798c216d21de..2e2ff6cd268176a25ee38bec4be26b6d8ff9aeae 100644
--- a/src/mksnapshot.cc
+++ b/src/mksnapshot.cc
@@ -67,6 +67,11 @@ class SnapshotWriter {
const i::Serializer& serializer,
const i::List<i::byte>& context_snapshot_data,
const i::Serializer& context_serializer) const {
+ // The serializer supports large objects, but we don't expect any in the
+ // the startup snapshot. If this changes, we need to write it into the
+ // snapshot file and read it for deserialization.
+ CHECK_EQ(0, serializer.large_objects_total_size());
+ CHECK_EQ(0, context_serializer.large_objects_total_size());
WriteSnapshotFile(snapshot_data, serializer,
context_snapshot_data, context_serializer);
MaybeWriteStartupBlob(snapshot_data, serializer,
@@ -84,10 +89,11 @@ class SnapshotWriter {
i::List<i::byte> startup_blob;
i::ListSnapshotSink sink(&startup_blob);
- int spaces[] = {
- i::NEW_SPACE, i::OLD_POINTER_SPACE, i::OLD_DATA_SPACE, i::CODE_SPACE,
- i::MAP_SPACE, i::CELL_SPACE, i::PROPERTY_CELL_SPACE
- };
+ // Large object space reservation is not necessary.
+ int spaces[] = {i::NEW_SPACE, i::OLD_POINTER_SPACE,
+ i::OLD_DATA_SPACE, i::CODE_SPACE,
+ i::MAP_SPACE, i::CELL_SPACE,
+ i::PROPERTY_CELL_SPACE};
i::byte* snapshot_bytes = snapshot_data.begin();
sink.PutBlob(snapshot_bytes, snapshot_data.length(), "snapshot");
« no previous file with comments | « src/heap/spaces.cc ('k') | src/serialize.h » ('j') | src/serialize.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698