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 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 intptr_t length = pool->ptr()->length_; | 1804 intptr_t length = pool->ptr()->length_; |
1805 s->Write<int32_t>(length); | 1805 s->Write<int32_t>(length); |
1806 for (intptr_t j = 0; j < length; j++) { | 1806 for (intptr_t j = 0; j < length; j++) { |
1807 ObjectPool::EntryType entry_type = | 1807 ObjectPool::EntryType entry_type = |
1808 static_cast<ObjectPool::EntryType>(info_array->ptr()->data()[j]); | 1808 static_cast<ObjectPool::EntryType>(info_array->ptr()->data()[j]); |
1809 s->Write<int8_t>(entry_type); | 1809 s->Write<int8_t>(entry_type); |
1810 RawObjectPool::Entry& entry = pool->ptr()->data()[j]; | 1810 RawObjectPool::Entry& entry = pool->ptr()->data()[j]; |
1811 switch (entry_type) { | 1811 switch (entry_type) { |
1812 case ObjectPool::kTaggedObject: { | 1812 case ObjectPool::kTaggedObject: { |
1813 #if !defined(TARGET_ARCH_DBC) | 1813 #if !defined(TARGET_ARCH_DBC) |
1814 if (entry.raw_obj_ == | 1814 if ((entry.raw_obj_ == |
1815 StubCode::CallNativeCFunction_entry()->code()) { | 1815 StubCode::CallNoScopeNative_entry()->code()) || |
| 1816 (entry.raw_obj_ == |
| 1817 StubCode::CallAutoScopeNative_entry()->code())) { |
1816 // Natives can run while precompiling, becoming linked and | 1818 // Natives can run while precompiling, becoming linked and |
1817 // switching their stub. Reset to the initial stub used for | 1819 // switching their stub. Reset to the initial stub used for |
1818 // lazy-linking. | 1820 // lazy-linking. |
1819 s->WriteRef(StubCode::CallBootstrapCFunction_entry()->code()); | 1821 s->WriteRef(StubCode::CallBootstrapNative_entry()->code()); |
1820 break; | 1822 break; |
1821 } | 1823 } |
1822 #endif | 1824 #endif |
1823 s->WriteRef(entry.raw_obj_); | 1825 s->WriteRef(entry.raw_obj_); |
1824 break; | 1826 break; |
1825 } | 1827 } |
1826 case ObjectPool::kImmediate: { | 1828 case ObjectPool::kImmediate: { |
1827 s->Write<intptr_t>(entry.raw_value_); | 1829 s->Write<intptr_t>(entry.raw_value_); |
1828 break; | 1830 break; |
1829 } | 1831 } |
(...skipping 3721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5551 thread_->isolate()->SetupImagePage(data_buffer_, | 5553 thread_->isolate()->SetupImagePage(data_buffer_, |
5552 /* is_executable */ false); | 5554 /* is_executable */ false); |
5553 } | 5555 } |
5554 | 5556 |
5555 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); | 5557 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); |
5556 | 5558 |
5557 return ApiError::null(); | 5559 return ApiError::null(); |
5558 } | 5560 } |
5559 | 5561 |
5560 } // namespace dart | 5562 } // namespace dart |
OLD | NEW |