Chromium Code Reviews| Index: runtime/vm/object.h |
| diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
| index 609eed90cb5c91cc784c2650a4bdf1c02bac0790..b892d0de1f6094e12bc1899200830b3ce4fde92f 100644 |
| --- a/runtime/vm/object.h |
| +++ b/runtime/vm/object.h |
| @@ -200,7 +200,6 @@ class Object { |
| } |
| inline RawClass* clazz() const; |
| - static intptr_t class_offset() { return OFFSET_OF(RawObject, class_); } |
| static intptr_t tags_offset() { return OFFSET_OF(RawObject, tags_); } |
| // Class testers. |
| @@ -710,6 +709,10 @@ class Class : public Object { |
| // otherwise a new object is allocated and returned. |
| static RawClass* GetClass(ObjectKind kind); |
| + void ForceSetRaw(RawClass* raw) { |
| + raw_ = raw; |
| + } |
| + |
| private: |
| void set_name(const String& value) const; |
| void set_script(const Script& value) const; |
| @@ -2251,6 +2254,9 @@ class Code : public Object { |
| static RawCode* FinalizeCode(const Function& function, Assembler* assembler); |
| static RawCode* FinalizeCode(const char* name, Assembler* assembler); |
| static RawCode* LookupCode(uword pc); |
| +#ifdef DEBUG |
| + static void FindAndPrint(uword pc); |
| +#endif |
| int32_t GetPointerOffsetAt(int index) const { |
| return *PointerOffsetAddrAt(index); |
| @@ -4877,12 +4883,8 @@ RawClass* Object::clazz() const { |
| if ((raw_value & kSmiTagMask) == kSmiTag) { |
| return Smi::Class(); |
| } |
| - RawClass* result = raw_->ptr()->class_; |
| - ASSERT(result->ptr()->index_ == |
| - RawObject::ClassTag::decode(raw_->ptr()->tags_)); |
| - ASSERT(Isolate::Current()->class_table()->At( |
| - RawObject::ClassTag::decode(raw_->ptr()->tags_)) == result); |
| - return result; |
| + |
| + return raw_->GetClass(); |
|
Ivan Posva
2012/05/26 04:34:46
Please no functionality on RawObjects.
Vyacheslav Egorov (Google)
2012/05/26 16:48:22
ok. There is RawObject::Size so I assumed that Raw
|
| } |
| @@ -4902,7 +4904,7 @@ void Object::SetRaw(RawObject* value) { |
| vm_isolate_heap->Contains(reinterpret_cast<uword>(raw_->ptr()))); |
| #endif |
| set_vtable((raw_ == null_) ? |
| - handle_vtable_ : raw_->ptr()->class_->ptr()->handle_vtable_); |
| + handle_vtable_ : raw_->GetClass()->ptr()->handle_vtable_); |
| } |