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 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1739 RawObjectPool* pool = ObjectPool::RawCast(object); | 1739 RawObjectPool* pool = ObjectPool::RawCast(object); |
1740 objects_.Add(pool); | 1740 objects_.Add(pool); |
1741 | 1741 |
1742 intptr_t length = pool->ptr()->length_; | 1742 intptr_t length = pool->ptr()->length_; |
1743 RawTypedData* info_array = pool->ptr()->info_array_; | 1743 RawTypedData* info_array = pool->ptr()->info_array_; |
1744 | 1744 |
1745 for (intptr_t i = 0; i < length; i++) { | 1745 for (intptr_t i = 0; i < length; i++) { |
1746 ObjectPool::EntryType entry_type = | 1746 ObjectPool::EntryType entry_type = |
1747 static_cast<ObjectPool::EntryType>(info_array->ptr()->data()[i]); | 1747 static_cast<ObjectPool::EntryType>(info_array->ptr()->data()[i]); |
1748 if (entry_type == ObjectPool::kTaggedObject) { | 1748 if (entry_type == ObjectPool::kTaggedObject) { |
1749 s->Push(pool->ptr()->data()[i].raw_obj_); | 1749 RawObject* entry = pool->ptr()->data()[i].raw_obj_; |
| 1750 if (entry == StubCode::FixCallersTarget_entry()->code()) { |
| 1751 s->UnexpectedObject(entry, "FixCallersTarget"); |
| 1752 } |
| 1753 s->Push(entry); |
1750 } | 1754 } |
1751 } | 1755 } |
1752 | 1756 |
1753 // TODO(rmacnak): Allocate the object pool and its info array together. | 1757 // TODO(rmacnak): Allocate the object pool and its info array together. |
1754 } | 1758 } |
1755 | 1759 |
1756 void WriteAlloc(Serializer* s) { | 1760 void WriteAlloc(Serializer* s) { |
1757 s->WriteCid(kObjectPoolCid); | 1761 s->WriteCid(kObjectPoolCid); |
1758 intptr_t count = objects_.length(); | 1762 intptr_t count = objects_.length(); |
1759 s->Write<int32_t>(count); | 1763 s->Write<int32_t>(count); |
(...skipping 3785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5545 thread_->isolate()->SetupImagePage(data_buffer_, | 5549 thread_->isolate()->SetupImagePage(data_buffer_, |
5546 /* is_executable */ false); | 5550 /* is_executable */ false); |
5547 } | 5551 } |
5548 | 5552 |
5549 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); | 5553 deserializer.ReadIsolateSnapshot(thread_->isolate()->object_store()); |
5550 | 5554 |
5551 return ApiError::null(); | 5555 return ApiError::null(); |
5552 } | 5556 } |
5553 | 5557 |
5554 } // namespace dart | 5558 } // namespace dart |
OLD | NEW |