Chromium Code Reviews| Index: runtime/vm/raw_object.h |
| diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h |
| index db7191d1b36e7c9c9bfde9c4fea7d296ae6bd181..d5a3129600bd7a747d98be74463cbca7445dc891 100644 |
| --- a/runtime/vm/raw_object.h |
| +++ b/runtime/vm/raw_object.h |
| @@ -236,6 +236,10 @@ class RawObject { |
| return (addr & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset; |
| } |
| + bool IsFree() const { |
| + return FreeBit::decode(ptr()->tags_); |
| + } |
| + |
| // Support for GC marking bit. |
| bool IsMarked() const { |
| return MarkBit::decode(ptr()->tags_); |
| @@ -312,8 +316,15 @@ class RawObject { |
| static bool IsBuiltinListClassIndex(intptr_t index); |
| static bool IsByteArrayClassIndex(intptr_t index); |
| + RawClass* GetClass() const { |
| + return GetClass(ptr()->tags_); |
|
Ivan Posva
2012/05/26 04:34:46
If anything then all we should have here is GetCla
Vyacheslav Egorov (Google)
2012/05/26 16:48:22
Will do.
|
| + } |
| + |
| + static RawClass* GetClass(uword tags); |
|
Ivan Posva
2012/05/26 04:34:46
Does not belong here. Please move to Object, or Cl
Vyacheslav Egorov (Google)
2012/05/26 16:48:22
Will do.
|
| + |
| + class CreatedFromSnapshotTag : public BitField<bool, kFromSnapshotBit, 1> {}; |
| + |
| protected: |
| - RawClass* class_; |
| uword tags_; // Various object tags (bits). |
| private: |
| @@ -323,7 +334,6 @@ class RawObject { |
| class CanonicalObjectTag : public BitField<bool, kCanonicalBit, 1> {}; |
| - class CreatedFromSnapshotTag : public BitField<bool, kFromSnapshotBit, 1> {}; |
| RawObject* ptr() const { |
| ASSERT(IsHeapObject()); |
| @@ -401,6 +411,7 @@ class RawClass : public RawObject { |
| friend class RawInstructions; |
| friend RawClass* AllocateFakeClass(); |
| friend class SnapshotReader; |
| + friend class ClassTable; |
| }; |