OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/raw_object.h" | 5 #include "vm/raw_object.h" |
6 | 6 |
7 #include "vm/class_table.h" | 7 #include "vm/class_table.h" |
8 #include "vm/freelist.h" | 8 #include "vm/freelist.h" |
9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
10 #include "vm/object.h" | 10 #include "vm/object.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 #define RAW_VISITPOINTERS(clazz) \ | 314 #define RAW_VISITPOINTERS(clazz) \ |
315 case kExternalTypedData##clazz##Cid: | 315 case kExternalTypedData##clazz##Cid: |
316 CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS) { | 316 CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS) { |
317 RawExternalTypedData* raw_obj = | 317 RawExternalTypedData* raw_obj = |
318 reinterpret_cast<RawExternalTypedData*>(this); | 318 reinterpret_cast<RawExternalTypedData*>(this); |
319 size = RawExternalTypedData::VisitExternalTypedDataPointers(raw_obj, | 319 size = RawExternalTypedData::VisitExternalTypedDataPointers(raw_obj, |
320 visitor); | 320 visitor); |
321 break; | 321 break; |
322 } | 322 } |
323 #undef RAW_VISITPOINTERS | 323 #undef RAW_VISITPOINTERS |
| 324 #define RAW_VISITPOINTERS(clazz) \ |
| 325 case kTypedData##clazz##ViewCid: |
| 326 CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS) |
| 327 case kByteDataViewCid: { |
| 328 RawInstance* raw_obj = reinterpret_cast<RawInstance*>(this); |
| 329 size = RawInstance::VisitInstancePointers(raw_obj, visitor); |
| 330 break; |
| 331 } |
| 332 #undef RAW_VISITPOINTERS |
324 case kFreeListElement: { | 333 case kFreeListElement: { |
325 ASSERT(FreeBit::decode(ptr()->tags_)); | 334 ASSERT(FreeBit::decode(ptr()->tags_)); |
326 uword addr = RawObject::ToAddr(const_cast<RawObject*>(this)); | 335 uword addr = RawObject::ToAddr(const_cast<RawObject*>(this)); |
327 FreeListElement* element = reinterpret_cast<FreeListElement*>(addr); | 336 FreeListElement* element = reinterpret_cast<FreeListElement*>(addr); |
328 size = element->Size(); | 337 size = element->Size(); |
329 break; | 338 break; |
330 } | 339 } |
331 default: | 340 default: |
332 OS::Print("Class Id: %"Pd"\n", class_id); | 341 OS::Print("Class Id: %"Pd"\n", class_id); |
333 UNREACHABLE(); | 342 UNREACHABLE(); |
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 | 1122 |
1114 intptr_t RawWeakProperty::VisitWeakPropertyPointers( | 1123 intptr_t RawWeakProperty::VisitWeakPropertyPointers( |
1115 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) { | 1124 RawWeakProperty* raw_obj, ObjectPointerVisitor* visitor) { |
1116 // Make sure that we got here with the tagged pointer as this. | 1125 // Make sure that we got here with the tagged pointer as this. |
1117 ASSERT(raw_obj->IsHeapObject()); | 1126 ASSERT(raw_obj->IsHeapObject()); |
1118 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 1127 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
1119 return WeakProperty::InstanceSize(); | 1128 return WeakProperty::InstanceSize(); |
1120 } | 1129 } |
1121 | 1130 |
1122 } // namespace dart | 1131 } // namespace dart |
OLD | NEW |