| 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 4940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4951 heap_(thread->isolate()->heap()), | 4951 heap_(thread->isolate()->heap()), |
| 4952 zone_(thread->zone()), | 4952 zone_(thread->zone()), |
| 4953 kind_(kind), | 4953 kind_(kind), |
| 4954 stream_(buffer, size), | 4954 stream_(buffer, size), |
| 4955 image_reader_(NULL), | 4955 image_reader_(NULL), |
| 4956 refs_(NULL), | 4956 refs_(NULL), |
| 4957 next_ref_index_(1), | 4957 next_ref_index_(1), |
| 4958 clusters_(NULL) { | 4958 clusters_(NULL) { |
| 4959 if (Snapshot::IncludesCode(kind)) { | 4959 if (Snapshot::IncludesCode(kind)) { |
| 4960 ASSERT(instructions_buffer != NULL); | 4960 ASSERT(instructions_buffer != NULL); |
| 4961 } | 4961 ASSERT(data_buffer != NULL); |
| 4962 if (instructions_buffer != NULL) { | |
| 4963 image_reader_ = new (zone_) ImageReader(instructions_buffer, data_buffer); | 4962 image_reader_ = new (zone_) ImageReader(instructions_buffer, data_buffer); |
| 4964 } | 4963 } |
| 4965 } | 4964 } |
| 4966 | 4965 |
| 4967 | 4966 |
| 4968 Deserializer::~Deserializer() { | 4967 Deserializer::~Deserializer() { |
| 4969 delete[] clusters_; | 4968 delete[] clusters_; |
| 4970 } | 4969 } |
| 4971 | 4970 |
| 4972 | 4971 |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5635 thread_->isolate()->SetupImagePage(data_buffer_, | 5634 thread_->isolate()->SetupImagePage(data_buffer_, |
| 5636 /* is_executable */ false); | 5635 /* is_executable */ false); |
| 5637 } | 5636 } |
| 5638 | 5637 |
| 5639 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); | 5638 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); |
| 5640 | 5639 |
| 5641 return ApiError::null(); | 5640 return ApiError::null(); |
| 5642 } | 5641 } |
| 5643 | 5642 |
| 5644 } // namespace dart | 5643 } // namespace dart |
| OLD | NEW |