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/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "vm/hash_table.h" | 7 #include "vm/hash_table.h" |
8 #include "vm/isolate_reload.h" | 8 #include "vm/isolate_reload.h" |
9 #include "vm/log.h" | 9 #include "vm/log.h" |
10 #include "vm/resolver.h" | 10 #include "vm/resolver.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 void Code::ResetICDatas(Zone* zone) const { | 60 void Code::ResetICDatas(Zone* zone) const { |
61 // Iterate over the Code's object pool and reset all ICDatas. | 61 // Iterate over the Code's object pool and reset all ICDatas. |
62 #ifdef TARGET_ARCH_IA32 | 62 #ifdef TARGET_ARCH_IA32 |
63 // IA32 does not have an object pool, but, we can iterate over all | 63 // IA32 does not have an object pool, but, we can iterate over all |
64 // embedded objects by using the variable length data section. | 64 // embedded objects by using the variable length data section. |
65 if (!is_alive()) { | 65 if (!is_alive()) { |
66 return; | 66 return; |
67 } | 67 } |
68 const Instructions& instrs = Instructions::Handle(zone, instructions()); | 68 const Instructions& instrs = Instructions::Handle(zone, instructions()); |
69 ASSERT(!instrs.IsNull()); | 69 ASSERT(!instrs.IsNull()); |
70 uword base_address = instrs.EntryPoint(); | 70 uword base_address = instrs.PayloadStart(); |
71 Object& object = Object::Handle(zone); | 71 Object& object = Object::Handle(zone); |
72 intptr_t offsets_length = pointer_offsets_length(); | 72 intptr_t offsets_length = pointer_offsets_length(); |
73 const int32_t* offsets = raw_ptr()->data(); | 73 const int32_t* offsets = raw_ptr()->data(); |
74 for (intptr_t i = 0; i < offsets_length; i++) { | 74 for (intptr_t i = 0; i < offsets_length; i++) { |
75 int32_t offset = offsets[i]; | 75 int32_t offset = offsets[i]; |
76 RawObject** object_ptr = | 76 RawObject** object_ptr = |
77 reinterpret_cast<RawObject**>(base_address + offset); | 77 reinterpret_cast<RawObject**>(base_address + offset); |
78 RawObject* raw_object = *object_ptr; | 78 RawObject* raw_object = *object_ptr; |
79 if (!raw_object->IsHeapObject()) { | 79 if (!raw_object->IsHeapObject()) { |
80 continue; | 80 continue; |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 const Array& data_array = | 753 const Array& data_array = |
754 Array::Handle(zone, CachedEmptyICDataArray(num_args)); | 754 Array::Handle(zone, CachedEmptyICDataArray(num_args)); |
755 set_ic_data_array(data_array); | 755 set_ic_data_array(data_array); |
756 } | 756 } |
757 } | 757 } |
758 } | 758 } |
759 | 759 |
760 #endif // !PRODUCT | 760 #endif // !PRODUCT |
761 | 761 |
762 } // namespace dart. | 762 } // namespace dart. |
OLD | NEW |