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/atomic.h" | 9 #include "vm/atomic.h" |
10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 }; | 187 }; |
188 | 188 |
189 enum TypedDataElementType { | 189 enum TypedDataElementType { |
190 #define V(name) k##name##Element, | 190 #define V(name) k##name##Element, |
191 CLASS_LIST_TYPED_DATA(V) | 191 CLASS_LIST_TYPED_DATA(V) |
192 #undef V | 192 #undef V |
193 }; | 193 }; |
194 | 194 |
195 #define SNAPSHOT_WRITER_SUPPORT() \ | 195 #define SNAPSHOT_WRITER_SUPPORT() \ |
196 void WriteTo( \ | 196 void WriteTo( \ |
197 SnapshotWriter* writer, intptr_t object_id, Snapshot::Kind kind); \ | 197 SnapshotWriter* writer, intptr_t object_id, \ |
| 198 Snapshot::Kind kind, bool as_reference); \ |
198 friend class SnapshotWriter; \ | 199 friend class SnapshotWriter; \ |
199 | 200 |
200 #define VISITOR_SUPPORT(object) \ | 201 #define VISITOR_SUPPORT(object) \ |
201 static intptr_t Visit##object##Pointers(Raw##object* raw_obj, \ | 202 static intptr_t Visit##object##Pointers(Raw##object* raw_obj, \ |
202 ObjectPointerVisitor* visitor); | 203 ObjectPointerVisitor* visitor); |
203 | 204 |
204 #define HEAP_PROFILER_SUPPORT() \ | 205 #define HEAP_PROFILER_SUPPORT() \ |
205 friend class HeapProfiler; \ | 206 friend class HeapProfiler; \ |
206 | 207 |
207 #define RAW_OBJECT_IMPLEMENTATION(object) \ | 208 #define RAW_OBJECT_IMPLEMENTATION(object) \ |
(...skipping 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2241 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2241 kTypedDataInt8ArrayViewCid + 15); | 2242 kTypedDataInt8ArrayViewCid + 15); |
2242 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2243 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2243 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2244 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2244 return (kNullCid - kTypedDataInt8ArrayCid); | 2245 return (kNullCid - kTypedDataInt8ArrayCid); |
2245 } | 2246 } |
2246 | 2247 |
2247 } // namespace dart | 2248 } // namespace dart |
2248 | 2249 |
2249 #endif // VM_RAW_OBJECT_H_ | 2250 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |