Chromium Code Reviews| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 244 size = RawInstance::VisitInstancePointers(raw_obj, visitor); | 244 size = RawInstance::VisitInstancePointers(raw_obj, visitor); |
| 245 break; | 245 break; |
| 246 } | 246 } |
| 247 #undef RAW_VISITPOINTERS | 247 #undef RAW_VISITPOINTERS |
| 248 case kFreeListElement: { | 248 case kFreeListElement: { |
| 249 uword addr = RawObject::ToAddr(const_cast<RawObject*>(this)); | 249 uword addr = RawObject::ToAddr(const_cast<RawObject*>(this)); |
| 250 FreeListElement* element = reinterpret_cast<FreeListElement*>(addr); | 250 FreeListElement* element = reinterpret_cast<FreeListElement*>(addr); |
| 251 size = element->Size(); | 251 size = element->Size(); |
| 252 break; | 252 break; |
| 253 } | 253 } |
| 254 case kNullCid: | |
|
Ivan Posva
2013/09/27 00:28:58
How come we are visiting the Null object suddenly?
| |
| 255 size = Size(); | |
| 256 break; | |
| 254 default: | 257 default: |
| 255 OS::Print("Class Id: %" Pd "\n", class_id); | 258 OS::Print("Class Id: %" Pd "\n", class_id); |
| 256 UNREACHABLE(); | 259 UNREACHABLE(); |
| 257 break; | 260 break; |
| 258 } | 261 } |
| 259 } else { | 262 } else { |
| 260 RawInstance* raw_obj = reinterpret_cast<RawInstance*>(this); | 263 RawInstance* raw_obj = reinterpret_cast<RawInstance*>(this); |
| 261 size = RawInstance::VisitInstancePointers(raw_obj, visitor); | 264 size = RawInstance::VisitInstancePointers(raw_obj, visitor); |
| 262 } | 265 } |
| 263 | 266 |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 802 | 805 |
| 803 intptr_t RawMirrorReference::VisitMirrorReferencePointers( | 806 intptr_t RawMirrorReference::VisitMirrorReferencePointers( |
| 804 RawMirrorReference* raw_obj, ObjectPointerVisitor* visitor) { | 807 RawMirrorReference* raw_obj, ObjectPointerVisitor* visitor) { |
| 805 // Make sure that we got here with the tagged pointer as this. | 808 // Make sure that we got here with the tagged pointer as this. |
| 806 ASSERT(raw_obj->IsHeapObject()); | 809 ASSERT(raw_obj->IsHeapObject()); |
| 807 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 810 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 808 return MirrorReference::InstanceSize(); | 811 return MirrorReference::InstanceSize(); |
| 809 } | 812 } |
| 810 | 813 |
| 811 } // namespace dart | 814 } // namespace dart |
| OLD | NEW |