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/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 | |
| 18 const intptr_t RawPcDescriptors::kFullRecSize = sizeof(PcDescriptorRec); | |
|
siva
2014/07/16 00:41:28
shouldn't this be (RawPcDescriptors::PcDescriptorR
srdjan
2014/07/16 16:17:17
Done, although apparently not needed.
| |
| 19 const intptr_t RawPcDescriptors::kCompressedRecSize = | |
| 20 kFullRecSize - sizeof(int16_t); | |
| 21 | |
| 17 bool RawObject::IsVMHeapObject() const { | 22 bool RawObject::IsVMHeapObject() const { |
| 18 return Dart::vm_isolate()->heap()->Contains(ToAddr(this)); | 23 return Dart::vm_isolate()->heap()->Contains(ToAddr(this)); |
| 19 } | 24 } |
| 20 | 25 |
| 21 | 26 |
| 22 void RawObject::Validate(Isolate* isolate) const { | 27 void RawObject::Validate(Isolate* isolate) const { |
| 23 if (Object::void_class_ == reinterpret_cast<RawClass*>(kHeapObjectTag)) { | 28 if (Object::void_class_ == reinterpret_cast<RawClass*>(kHeapObjectTag)) { |
| 24 // Validation relies on properly initialized class classes. Skip if the | 29 // Validation relies on properly initialized class classes. Skip if the |
| 25 // VM is still being initialized. | 30 // VM is still being initialized. |
| 26 return; | 31 return; |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 874 intptr_t RawUserTag::VisitUserTagPointers( | 879 intptr_t RawUserTag::VisitUserTagPointers( |
| 875 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { | 880 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { |
| 876 // Make sure that we got here with the tagged pointer as this. | 881 // Make sure that we got here with the tagged pointer as this. |
| 877 ASSERT(raw_obj->IsHeapObject()); | 882 ASSERT(raw_obj->IsHeapObject()); |
| 878 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 883 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 879 return UserTag::InstanceSize(); | 884 return UserTag::InstanceSize(); |
| 880 } | 885 } |
| 881 | 886 |
| 882 | 887 |
| 883 } // namespace dart | 888 } // namespace dart |
| OLD | NEW |