| 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 #ifndef VM_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
| 6 #define VM_RAW_OBJECT_H_ | 6 #define VM_RAW_OBJECT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 intptr_t result = SizeTag::decode(tags); | 254 intptr_t result = SizeTag::decode(tags); |
| 255 if ((result != 0) && !FreeBit::decode(tags)) { | 255 if ((result != 0) && !FreeBit::decode(tags)) { |
| 256 ASSERT(result == SizeFromClass()); | 256 ASSERT(result == SizeFromClass()); |
| 257 return result; | 257 return result; |
| 258 } | 258 } |
| 259 result = SizeFromClass(); | 259 result = SizeFromClass(); |
| 260 ASSERT((result > SizeTag::kMaxSizeTag) || FreeBit::decode(tags)); | 260 ASSERT((result > SizeTag::kMaxSizeTag) || FreeBit::decode(tags)); |
| 261 return result; | 261 return result; |
| 262 } | 262 } |
| 263 | 263 |
| 264 void Validate() const; | 264 void Validate(Isolate* isolate) const; |
| 265 intptr_t VisitPointers(ObjectPointerVisitor* visitor); | 265 intptr_t VisitPointers(ObjectPointerVisitor* visitor); |
| 266 bool FindObject(FindObjectVisitor* visitor); | 266 bool FindObject(FindObjectVisitor* visitor); |
| 267 | 267 |
| 268 static RawObject* FromAddr(uword addr) { | 268 static RawObject* FromAddr(uword addr) { |
| 269 // We expect the untagged address here. | 269 // We expect the untagged address here. |
| 270 ASSERT((addr & kSmiTagMask) != kHeapObjectTag); | 270 ASSERT((addr & kSmiTagMask) != kHeapObjectTag); |
| 271 return reinterpret_cast<RawObject*>(addr + kHeapObjectTag); | 271 return reinterpret_cast<RawObject*>(addr + kHeapObjectTag); |
| 272 } | 272 } |
| 273 | 273 |
| 274 static uword ToAddr(RawObject* raw_obj) { | 274 static uword ToAddr(RawObject* raw_obj) { |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 intptr_t type_; // Uninitialized, simple or complex. | 1199 intptr_t type_; // Uninitialized, simple or complex. |
| 1200 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 1200 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 1201 | 1201 |
| 1202 // Variable length data follows here. | 1202 // Variable length data follows here. |
| 1203 uint8_t data_[0]; | 1203 uint8_t data_[0]; |
| 1204 }; | 1204 }; |
| 1205 | 1205 |
| 1206 } // namespace dart | 1206 } // namespace dart |
| 1207 | 1207 |
| 1208 #endif // VM_RAW_OBJECT_H_ | 1208 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |