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

Unified Diff: src/snapshot-common.cc

Issue 653033002: Break deserializer reservations into chunks that fit onto a page. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments and rebase Created 6 years, 2 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/serialize.cc ('k') | src/snapshot-external.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot-common.cc
diff --git a/src/snapshot-common.cc b/src/snapshot-common.cc
index 4e90ce14e71e4b4f9430e16320d73174fac7ae59..b152ad354b660f16b82bb4c8edee84eaf0342237 100644
--- a/src/snapshot-common.cc
+++ b/src/snapshot-common.cc
@@ -15,14 +15,14 @@ namespace v8 {
namespace internal {
void Snapshot::ReserveSpaceForLinkedInSnapshot(Deserializer* deserializer) {
- deserializer->set_reservation(NEW_SPACE, new_space_used_);
- deserializer->set_reservation(OLD_POINTER_SPACE, pointer_space_used_);
- deserializer->set_reservation(OLD_DATA_SPACE, data_space_used_);
- deserializer->set_reservation(CODE_SPACE, code_space_used_);
- deserializer->set_reservation(MAP_SPACE, map_space_used_);
- deserializer->set_reservation(CELL_SPACE, cell_space_used_);
- deserializer->set_reservation(PROPERTY_CELL_SPACE, property_cell_space_used_);
- deserializer->set_reservation(LO_SPACE, lo_space_used_);
+ deserializer->AddReservation(NEW_SPACE, new_space_used_);
+ deserializer->AddReservation(OLD_POINTER_SPACE, pointer_space_used_);
+ deserializer->AddReservation(OLD_DATA_SPACE, data_space_used_);
+ deserializer->AddReservation(CODE_SPACE, code_space_used_);
+ deserializer->AddReservation(MAP_SPACE, map_space_used_);
+ deserializer->AddReservation(CELL_SPACE, cell_space_used_);
+ deserializer->AddReservation(PROPERTY_CELL_SPACE, property_cell_space_used_);
+ deserializer->AddReservation(LO_SPACE, lo_space_used_);
}
@@ -59,15 +59,15 @@ Handle<Context> Snapshot::NewContextFromSnapshot(Isolate* isolate) {
context_raw_size_);
Deserializer deserializer(&source);
Object* root;
- deserializer.set_reservation(NEW_SPACE, context_new_space_used_);
- deserializer.set_reservation(OLD_POINTER_SPACE, context_pointer_space_used_);
- deserializer.set_reservation(OLD_DATA_SPACE, context_data_space_used_);
- deserializer.set_reservation(CODE_SPACE, context_code_space_used_);
- deserializer.set_reservation(MAP_SPACE, context_map_space_used_);
- deserializer.set_reservation(CELL_SPACE, context_cell_space_used_);
- deserializer.set_reservation(PROPERTY_CELL_SPACE,
- context_property_cell_space_used_);
- deserializer.set_reservation(LO_SPACE, context_lo_space_used_);
+ deserializer.AddReservation(NEW_SPACE, context_new_space_used_);
+ deserializer.AddReservation(OLD_POINTER_SPACE, context_pointer_space_used_);
+ deserializer.AddReservation(OLD_DATA_SPACE, context_data_space_used_);
+ deserializer.AddReservation(CODE_SPACE, context_code_space_used_);
+ deserializer.AddReservation(MAP_SPACE, context_map_space_used_);
+ deserializer.AddReservation(CELL_SPACE, context_cell_space_used_);
+ deserializer.AddReservation(PROPERTY_CELL_SPACE,
+ context_property_cell_space_used_);
+ deserializer.AddReservation(LO_SPACE, context_lo_space_used_);
deserializer.DeserializePartial(isolate, &root);
CHECK(root->IsContext());
return Handle<Context>(Context::cast(root));
« no previous file with comments | « src/serialize.cc ('k') | src/snapshot-external.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698