| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 "vm/assert.h" | 8 #include "vm/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/snapshot.h" | 10 #include "vm/snapshot.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 kNotMarked = 1, // Tagged pointer. | 189 kNotMarked = 1, // Tagged pointer. |
| 190 kMarked = 3, // Tagged pointer and forwarding bit set. | 190 kMarked = 3, // Tagged pointer and forwarding bit set. |
| 191 }; | 191 }; |
| 192 | 192 |
| 193 RawObject* ptr() const { | 193 RawObject* ptr() const { |
| 194 ASSERT(IsHeapObject()); | 194 ASSERT(IsHeapObject()); |
| 195 return reinterpret_cast<RawObject*>( | 195 return reinterpret_cast<RawObject*>( |
| 196 reinterpret_cast<uword>(this) - kHeapObjectTag); | 196 reinterpret_cast<uword>(this) - kHeapObjectTag); |
| 197 } | 197 } |
| 198 | 198 |
| 199 intptr_t tags_; // Various object tags (bits). |
| 200 |
| 199 friend class Object; | 201 friend class Object; |
| 200 friend class Array; | 202 friend class Array; |
| 201 friend class SnapshotWriter; | 203 friend class SnapshotWriter; |
| 202 friend class SnapshotReader; | 204 friend class SnapshotReader; |
| 203 friend class MarkingVisitor; | 205 friend class MarkingVisitor; |
| 204 | 206 |
| 205 DISALLOW_ALLOCATION(); | 207 DISALLOW_ALLOCATION(); |
| 206 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject); | 208 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject); |
| 207 }; | 209 }; |
| 208 | 210 |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 intptr_t type_; // Uninitialized, simple or complex. | 858 intptr_t type_; // Uninitialized, simple or complex. |
| 857 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 859 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 858 | 860 |
| 859 // Variable length data follows here. | 861 // Variable length data follows here. |
| 860 uint8_t data_[0]; | 862 uint8_t data_[0]; |
| 861 }; | 863 }; |
| 862 | 864 |
| 863 } // namespace dart | 865 } // namespace dart |
| 864 | 866 |
| 865 #endif // VM_RAW_OBJECT_H_ | 867 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |