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 3534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3545 for (intptr_t id = start_index_; id < stop_index_; id++) { | 3545 for (intptr_t id = start_index_; id < stop_index_; id++) { |
3546 RawExternalTypedData* data = | 3546 RawExternalTypedData* data = |
3547 reinterpret_cast<RawExternalTypedData*>(d->Ref(id)); | 3547 reinterpret_cast<RawExternalTypedData*>(d->Ref(id)); |
3548 intptr_t length = d->Read<int32_t>(); | 3548 intptr_t length = d->Read<int32_t>(); |
3549 Deserializer::InitializeHeader(data, cid_, | 3549 Deserializer::InitializeHeader(data, cid_, |
3550 ExternalTypedData::InstanceSize(), | 3550 ExternalTypedData::InstanceSize(), |
3551 is_vm_object); | 3551 is_vm_object); |
3552 data->ptr()->length_ = Smi::New(length); | 3552 data->ptr()->length_ = Smi::New(length); |
3553 data->ptr()->data_ = const_cast<uint8_t*>(d->CurrentBufferAddress()); | 3553 data->ptr()->data_ = const_cast<uint8_t*>(d->CurrentBufferAddress()); |
3554 d->Advance(length * element_size); | 3554 d->Advance(length * element_size); |
| 3555 // No finalizer / external size 0. |
3555 } | 3556 } |
3556 } | 3557 } |
3557 | 3558 |
3558 private: | 3559 private: |
3559 const intptr_t cid_; | 3560 const intptr_t cid_; |
3560 }; | 3561 }; |
3561 | 3562 |
3562 | 3563 |
3563 class StacktraceSerializationCluster : public SerializationCluster { | 3564 class StacktraceSerializationCluster : public SerializationCluster { |
3564 public: | 3565 public: |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5011 | 5012 |
5012 deserializer.ReadVMSnapshot(); | 5013 deserializer.ReadVMSnapshot(); |
5013 | 5014 |
5014 Dart::set_instructions_snapshot_buffer(instructions_buffer_); | 5015 Dart::set_instructions_snapshot_buffer(instructions_buffer_); |
5015 Dart::set_data_snapshot_buffer(data_buffer_); | 5016 Dart::set_data_snapshot_buffer(data_buffer_); |
5016 | 5017 |
5017 return ApiError::null(); | 5018 return ApiError::null(); |
5018 } | 5019 } |
5019 | 5020 |
5020 } // namespace dart | 5021 } // namespace dart |
OLD | NEW |