OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/clustered_snapshot.h" | 5 #include "vm/clustered_snapshot.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/bootstrap.h" | 8 #include "vm/bootstrap.h" |
9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "vm/timeline.h" | 21 #include "vm/timeline.h" |
22 #include "vm/version.h" | 22 #include "vm/version.h" |
23 | 23 |
24 namespace dart { | 24 namespace dart { |
25 | 25 |
26 static RawObject* AllocateUninitialized(PageSpace* old_space, intptr_t size) { | 26 static RawObject* AllocateUninitialized(PageSpace* old_space, intptr_t size) { |
27 ASSERT(Utils::IsAligned(size, kObjectAlignment)); | 27 ASSERT(Utils::IsAligned(size, kObjectAlignment)); |
28 uword address = old_space->TryAllocateDataBumpLocked(size, | 28 uword address = old_space->TryAllocateDataBumpLocked(size, |
29 PageSpace::kForceGrowth); | 29 PageSpace::kForceGrowth); |
30 if (address == 0) { | 30 if (address == 0) { |
31 FATAL("Out of memory"); | 31 OUT_OF_MEMORY(); |
32 } | 32 } |
33 return reinterpret_cast<RawObject*>(address + kHeapObjectTag); | 33 return reinterpret_cast<RawObject*>(address + kHeapObjectTag); |
34 } | 34 } |
35 | 35 |
36 | 36 |
37 void Deserializer::InitializeHeader(RawObject* raw, | 37 void Deserializer::InitializeHeader(RawObject* raw, |
38 intptr_t class_id, | 38 intptr_t class_id, |
39 intptr_t size, | 39 intptr_t size, |
40 bool is_vm_isolate, | 40 bool is_vm_isolate, |
41 bool is_canonical) { | 41 bool is_canonical) { |
(...skipping 5296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5338 | 5338 |
5339 deserializer.ReadVMSnapshot(); | 5339 deserializer.ReadVMSnapshot(); |
5340 | 5340 |
5341 Dart::set_instructions_snapshot_buffer(instructions_buffer_); | 5341 Dart::set_instructions_snapshot_buffer(instructions_buffer_); |
5342 Dart::set_data_snapshot_buffer(data_buffer_); | 5342 Dart::set_data_snapshot_buffer(data_buffer_); |
5343 | 5343 |
5344 return ApiError::null(); | 5344 return ApiError::null(); |
5345 } | 5345 } |
5346 | 5346 |
5347 } // namespace dart | 5347 } // namespace dart |
OLD | NEW |