| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 enum { | 96 enum { |
| 97 kSmiTag = 0, | 97 kSmiTag = 0, |
| 98 kHeapObjectTag = 1, | 98 kHeapObjectTag = 1, |
| 99 kSmiTagSize = 1, | 99 kSmiTagSize = 1, |
| 100 kSmiTagMask = 1, | 100 kSmiTagMask = 1, |
| 101 kSmiTagShift = 1, | 101 kSmiTagShift = 1, |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 #define SNAPSHOT_WRITER_SUPPORT() \ | 104 #define SNAPSHOT_WRITER_SUPPORT() \ |
| 105 void WriteTo( \ | 105 void WriteTo( \ |
| 106 SnapshotWriter* writer, intptr_t object_id, bool serialize_classes); \ | 106 SnapshotWriter* writer, intptr_t object_id, Snapshot::Kind kind); \ |
| 107 friend class SnapshotWriter; \ | 107 friend class SnapshotWriter; \ |
| 108 | 108 |
| 109 #define VISITOR_SUPPORT(object) \ | 109 #define VISITOR_SUPPORT(object) \ |
| 110 static intptr_t Visit##object##Pointers(Raw##object* raw_obj, \ | 110 static intptr_t Visit##object##Pointers(Raw##object* raw_obj, \ |
| 111 ObjectPointerVisitor* visitor); | 111 ObjectPointerVisitor* visitor); |
| 112 | 112 |
| 113 #define RAW_OBJECT_IMPLEMENTATION(object) \ | 113 #define RAW_OBJECT_IMPLEMENTATION(object) \ |
| 114 private: /* NOLINT */ \ | 114 private: /* NOLINT */ \ |
| 115 VISITOR_SUPPORT(object) \ | 115 VISITOR_SUPPORT(object) \ |
| 116 friend class object; \ | 116 friend class object; \ |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 intptr_t type_; // Uninitialized, simple or complex. | 855 intptr_t type_; // Uninitialized, simple or complex. |
| 856 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 856 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 857 | 857 |
| 858 // Variable length data follows here. | 858 // Variable length data follows here. |
| 859 uint8_t data_[0]; | 859 uint8_t data_[0]; |
| 860 }; | 860 }; |
| 861 | 861 |
| 862 } // namespace dart | 862 } // namespace dart |
| 863 | 863 |
| 864 #endif // VM_RAW_OBJECT_H_ | 864 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |