| OLD | NEW |
| 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/platform.h" |
| 10 #include "src/serialize.h" | 11 #include "src/serialize.h" |
| 11 #include "src/snapshot.h" | 12 #include "src/snapshot.h" |
| 12 #include "src/platform.h" | |
| 13 | 13 |
| 14 namespace v8 { | 14 namespace v8 { |
| 15 namespace internal { | 15 namespace internal { |
| 16 | 16 |
| 17 | 17 |
| 18 static void ReserveSpaceForSnapshot(Deserializer* deserializer, | 18 static void ReserveSpaceForSnapshot(Deserializer* deserializer, |
| 19 const char* file_name) { | 19 const char* file_name) { |
| 20 int file_name_length = StrLength(file_name) + 10; | 20 int file_name_length = StrLength(file_name) + 10; |
| 21 Vector<char> name = Vector<char>::New(file_name_length + 1); | 21 Vector<char> name = Vector<char>::New(file_name_length + 1); |
| 22 OS::SNPrintF(name, "%s.size", file_name); | 22 OS::SNPrintF(name, "%s.size", file_name); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 deserializer.set_reservation(MAP_SPACE, context_map_space_used_); | 117 deserializer.set_reservation(MAP_SPACE, context_map_space_used_); |
| 118 deserializer.set_reservation(CELL_SPACE, context_cell_space_used_); | 118 deserializer.set_reservation(CELL_SPACE, context_cell_space_used_); |
| 119 deserializer.set_reservation(PROPERTY_CELL_SPACE, | 119 deserializer.set_reservation(PROPERTY_CELL_SPACE, |
| 120 context_property_cell_space_used_); | 120 context_property_cell_space_used_); |
| 121 deserializer.DeserializePartial(isolate, &root); | 121 deserializer.DeserializePartial(isolate, &root); |
| 122 CHECK(root->IsContext()); | 122 CHECK(root->IsContext()); |
| 123 return Handle<Context>(Context::cast(root)); | 123 return Handle<Context>(Context::cast(root)); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } } // namespace v8::internal | 126 } } // namespace v8::internal |
| OLD | NEW |