| Index: vm/raw_object.cc
|
| ===================================================================
|
| --- vm/raw_object.cc (revision 2792)
|
| +++ vm/raw_object.cc (working copy)
|
| @@ -23,6 +23,10 @@
|
| RawClass* raw_class_class = raw_class->ptr()->class_;
|
| ASSERT(raw_class_class->IsHeapObject());
|
| ASSERT(raw_class_class->ptr()->instance_kind_ == kClass);
|
| +
|
| + // Validate that the tags_ field is sensible.
|
| + intptr_t tags = ptr()->tags_;
|
| + ASSERT((tags & 0xfffffff0) == 0);
|
| }
|
|
|
|
|
| @@ -33,13 +37,6 @@
|
| ASSERT(IsHeapObject());
|
|
|
| RawClass* raw_class = ptr()->class_;
|
| - if (IsMarked()) {
|
| - // If the object is marked we need to remove the marking bits from the
|
| - // raw_class which we loaded above.
|
| - uword header_bits = reinterpret_cast<uword>(raw_class);
|
| - header_bits = (header_bits & ~kMarkingMask) | kNotMarked;
|
| - raw_class = reinterpret_cast<RawClass*>(header_bits);
|
| - }
|
| intptr_t instance_size = raw_class->ptr()->instance_size_;
|
| ObjectKind instance_kind = raw_class->ptr()->instance_kind_;
|
|
|
| @@ -174,19 +171,10 @@
|
|
|
| // Read the necessary data out of the class before visting the class itself.
|
| RawClass* raw_class = ptr()->class_;
|
| - if (IsMarked()) {
|
| - // If the object is marked we need to remove the marking bits from the
|
| - // raw_class which we loaded above.
|
| - uword header_bits = reinterpret_cast<uword>(raw_class);
|
| - header_bits = (header_bits & ~kMarkingMask) | kNotMarked;
|
| - raw_class = reinterpret_cast<RawClass*>(header_bits);
|
| - }
|
| ObjectKind kind = raw_class->ptr()->instance_kind_;
|
|
|
| // Visit the class before visting the fields.
|
| - if (!IsMarked()) {
|
| - visitor->VisitPointer(reinterpret_cast<RawObject**>(&ptr()->class_));
|
| - }
|
| + visitor->VisitPointer(reinterpret_cast<RawObject**>(&ptr()->class_));
|
|
|
| switch (kind) {
|
| #define RAW_VISITPOINTERS(clazz) \
|
|
|