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 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1606 // switching their stub. Reset to the initial stub used for | 1606 // switching their stub. Reset to the initial stub used for |
1607 // lazy-linking. | 1607 // lazy-linking. |
1608 s->WriteRef(StubCode::CallBootstrapCFunction_entry()->code()); | 1608 s->WriteRef(StubCode::CallBootstrapCFunction_entry()->code()); |
1609 break; | 1609 break; |
1610 } | 1610 } |
1611 #endif | 1611 #endif |
1612 s->WriteRef(entry.raw_obj_); | 1612 s->WriteRef(entry.raw_obj_); |
1613 break; | 1613 break; |
1614 } | 1614 } |
1615 case ObjectPool::kImmediate: { | 1615 case ObjectPool::kImmediate: { |
1616 s->Write<int32_t>(entry.raw_value_); | 1616 s->Write<intptr_t>(entry.raw_value_); |
1617 break; | 1617 break; |
1618 } | 1618 } |
1619 case ObjectPool::kNativeEntry: { | 1619 case ObjectPool::kNativeEntry: { |
1620 // Write nothing. Will initialize with the lazy link entry. | 1620 // Write nothing. Will initialize with the lazy link entry. |
1621 #if defined(TARGET_ARCH_DBC) | 1621 #if defined(TARGET_ARCH_DBC) |
1622 UNREACHABLE(); // DBC does not support lazy native call linking. | 1622 UNREACHABLE(); // DBC does not support lazy native call linking. |
1623 #endif | 1623 #endif |
1624 break; | 1624 break; |
1625 } | 1625 } |
1626 default: | 1626 default: |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1672 for (intptr_t j = 0; j < length; j++) { | 1672 for (intptr_t j = 0; j < length; j++) { |
1673 ObjectPool::EntryType entry_type = | 1673 ObjectPool::EntryType entry_type = |
1674 static_cast<ObjectPool::EntryType>(d->Read<int8_t>()); | 1674 static_cast<ObjectPool::EntryType>(d->Read<int8_t>()); |
1675 info_array->ptr()->data()[j] = entry_type; | 1675 info_array->ptr()->data()[j] = entry_type; |
1676 RawObjectPool::Entry& entry = pool->ptr()->data()[j]; | 1676 RawObjectPool::Entry& entry = pool->ptr()->data()[j]; |
1677 switch (entry_type) { | 1677 switch (entry_type) { |
1678 case ObjectPool::kTaggedObject: | 1678 case ObjectPool::kTaggedObject: |
1679 entry.raw_obj_ = d->ReadRef(); | 1679 entry.raw_obj_ = d->ReadRef(); |
1680 break; | 1680 break; |
1681 case ObjectPool::kImmediate: | 1681 case ObjectPool::kImmediate: |
1682 entry.raw_value_ = d->Read<int32_t>(); | 1682 entry.raw_value_ = d->Read<intptr_t>(); |
1683 break; | 1683 break; |
1684 case ObjectPool::kNativeEntry: { | 1684 case ObjectPool::kNativeEntry: { |
1685 #if !defined(TARGET_ARCH_DBC) | 1685 #if !defined(TARGET_ARCH_DBC) |
1686 // Read nothing. Initialize with the lazy link entry. | 1686 // Read nothing. Initialize with the lazy link entry. |
1687 uword new_entry = NativeEntry::LinkNativeCallEntry(); | 1687 uword new_entry = NativeEntry::LinkNativeCallEntry(); |
1688 entry.raw_value_ = static_cast<intptr_t>(new_entry); | 1688 entry.raw_value_ = static_cast<intptr_t>(new_entry); |
1689 #else | 1689 #else |
1690 UNREACHABLE(); // DBC does not support lazy native call linking. | 1690 UNREACHABLE(); // DBC does not support lazy native call linking. |
1691 #endif | 1691 #endif |
1692 break; | 1692 break; |
(...skipping 3340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5033 | 5033 |
5034 deserializer.ReadVMSnapshot(); | 5034 deserializer.ReadVMSnapshot(); |
5035 | 5035 |
5036 Dart::set_instructions_snapshot_buffer(instructions_buffer_); | 5036 Dart::set_instructions_snapshot_buffer(instructions_buffer_); |
5037 Dart::set_data_snapshot_buffer(data_buffer_); | 5037 Dart::set_data_snapshot_buffer(data_buffer_); |
5038 | 5038 |
5039 return ApiError::null(); | 5039 return ApiError::null(); |
5040 } | 5040 } |
5041 | 5041 |
5042 } // namespace dart | 5042 } // namespace dart |
OLD | NEW |