| 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/dart.h" | 8 #include "vm/dart.h" |
| 9 #include "vm/freelist.h" | 9 #include "vm/freelist.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| 11 #include "vm/object.h" | 11 #include "vm/object.h" |
| 12 #include "vm/visitor.h" | 12 #include "vm/visitor.h" |
| 13 | 13 |
| 14 | 14 |
| 15 namespace dart { | 15 namespace dart { |
| 16 | 16 |
| 17 | 17 |
| 18 const intptr_t RawPcDescriptors::kFullRecSize = | 18 const intptr_t RawPcDescriptors::kFullRecSize = |
| 19 sizeof(RawPcDescriptors::PcDescriptorRec); | 19 sizeof(RawPcDescriptors::PcDescriptorRec); |
| 20 const intptr_t RawPcDescriptors::kCompressedRecSize = | 20 const intptr_t RawPcDescriptors::kCompressedRecSize = |
| 21 kFullRecSize - sizeof(int16_t); | 21 sizeof(RawPcDescriptors::CompressedPcDescriptorRec); |
| 22 | 22 |
| 23 bool RawObject::IsVMHeapObject() const { | 23 bool RawObject::IsVMHeapObject() const { |
| 24 return Dart::vm_isolate()->heap()->Contains(ToAddr(this)); | 24 return Dart::vm_isolate()->heap()->Contains(ToAddr(this)); |
| 25 } | 25 } |
| 26 | 26 |
| 27 | 27 |
| 28 void RawObject::Validate(Isolate* isolate) const { | 28 void RawObject::Validate(Isolate* isolate) const { |
| 29 if (Object::void_class_ == reinterpret_cast<RawClass*>(kHeapObjectTag)) { | 29 if (Object::void_class_ == reinterpret_cast<RawClass*>(kHeapObjectTag)) { |
| 30 // Validation relies on properly initialized class classes. Skip if the | 30 // Validation relies on properly initialized class classes. Skip if the |
| 31 // VM is still being initialized. | 31 // VM is still being initialized. |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 intptr_t RawUserTag::VisitUserTagPointers( | 888 intptr_t RawUserTag::VisitUserTagPointers( |
| 889 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { | 889 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { |
| 890 // Make sure that we got here with the tagged pointer as this. | 890 // Make sure that we got here with the tagged pointer as this. |
| 891 ASSERT(raw_obj->IsHeapObject()); | 891 ASSERT(raw_obj->IsHeapObject()); |
| 892 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 892 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 893 return UserTag::InstanceSize(); | 893 return UserTag::InstanceSize(); |
| 894 } | 894 } |
| 895 | 895 |
| 896 | 896 |
| 897 } // namespace dart | 897 } // namespace dart |
| OLD | NEW |