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

Side by Side Diff: src/snapshot-common.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The common functionality when building with or without snapshots. 5 // The common functionality when building with or without snapshots.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
11 #include "src/serialize.h" 11 #include "src/serialize.h"
12 #include "src/snapshot.h" 12 #include "src/snapshot.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 void Snapshot::ReserveSpaceForLinkedInSnapshot(Deserializer* deserializer) { 17 void Snapshot::ReserveSpaceForLinkedInSnapshot(Deserializer* deserializer) {
18 deserializer->set_reservation(NEW_SPACE, new_space_used_); 18 deserializer->set_reservation(NEW_SPACE, new_space_used_);
19 deserializer->set_reservation(OLD_POINTER_SPACE, pointer_space_used_); 19 deserializer->set_reservation(OLD_POINTER_SPACE, pointer_space_used_);
20 deserializer->set_reservation(OLD_DATA_SPACE, data_space_used_); 20 deserializer->set_reservation(OLD_DATA_SPACE, data_space_used_);
21 deserializer->set_reservation(CODE_SPACE, code_space_used_); 21 deserializer->set_reservation(CODE_SPACE, code_space_used_);
22 deserializer->set_reservation(MAP_SPACE, map_space_used_); 22 deserializer->set_reservation(MAP_SPACE, map_space_used_);
23 deserializer->set_reservation(CELL_SPACE, cell_space_used_); 23 deserializer->set_reservation(CELL_SPACE, cell_space_used_);
24 deserializer->set_reservation(PROPERTY_CELL_SPACE, 24 deserializer->set_reservation(PROPERTY_CELL_SPACE, property_cell_space_used_);
25 property_cell_space_used_);
26 } 25 }
27 26
28 27
29 bool Snapshot::Initialize(Isolate* isolate) { 28 bool Snapshot::Initialize(Isolate* isolate) {
30 if (size_ > 0) { 29 if (size_ > 0) {
31 base::ElapsedTimer timer; 30 base::ElapsedTimer timer;
32 if (FLAG_profile_deserialization) { 31 if (FLAG_profile_deserialization) {
33 timer.Start(); 32 timer.Start();
34 } 33 }
35 SnapshotByteSource source(raw_data_, raw_size_); 34 SnapshotByteSource source(raw_data_, raw_size_);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Dummy implementations of Set*FromFile(..) APIs. 76 // Dummy implementations of Set*FromFile(..) APIs.
78 // 77 //
79 // These are meant for use with snapshot-external.cc. Should this file 78 // These are meant for use with snapshot-external.cc. Should this file
80 // be compiled with those options we just supply these dummy implementations 79 // be compiled with those options we just supply these dummy implementations
81 // below. This happens when compiling the mksnapshot utility. 80 // below. This happens when compiling the mksnapshot utility.
82 void SetNativesFromFile(StartupData* data) { CHECK(false); } 81 void SetNativesFromFile(StartupData* data) { CHECK(false); }
83 void SetSnapshotFromFile(StartupData* data) { CHECK(false); } 82 void SetSnapshotFromFile(StartupData* data) { CHECK(false); }
84 #endif // V8_USE_EXTERNAL_STARTUP_DATA 83 #endif // V8_USE_EXTERNAL_STARTUP_DATA
85 84
86 } } // namespace v8::internal 85 } } // namespace v8::internal
OLDNEW
« src/serialize.h ('K') | « src/serialize.cc ('k') | src/snapshot-source-sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698