| 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_SNAPSHOT_H_ | 5 #ifndef VM_SNAPSHOT_H_ |
| 6 #define VM_SNAPSHOT_H_ | 6 #define VM_SNAPSHOT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/bitfield.h" | 10 #include "vm/bitfield.h" |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 ForwardList forward_list_; | 1108 ForwardList forward_list_; |
| 1109 | 1109 |
| 1110 DISALLOW_COPY_AND_ASSIGN(MessageWriter); | 1110 DISALLOW_COPY_AND_ASSIGN(MessageWriter); |
| 1111 }; | 1111 }; |
| 1112 | 1112 |
| 1113 | 1113 |
| 1114 // An object pointer visitor implementation which writes out | 1114 // An object pointer visitor implementation which writes out |
| 1115 // objects to a snap shot. | 1115 // objects to a snap shot. |
| 1116 class SnapshotWriterVisitor : public ObjectPointerVisitor { | 1116 class SnapshotWriterVisitor : public ObjectPointerVisitor { |
| 1117 public: | 1117 public: |
| 1118 explicit SnapshotWriterVisitor(SnapshotWriter* writer) | |
| 1119 : ObjectPointerVisitor(Isolate::Current()), | |
| 1120 writer_(writer), | |
| 1121 as_references_(true) {} | |
| 1122 | |
| 1123 SnapshotWriterVisitor(SnapshotWriter* writer, bool as_references) | 1118 SnapshotWriterVisitor(SnapshotWriter* writer, bool as_references) |
| 1124 : ObjectPointerVisitor(Isolate::Current()), | 1119 : ObjectPointerVisitor(Isolate::Current()), |
| 1125 writer_(writer), | 1120 writer_(writer), |
| 1126 as_references_(as_references) {} | 1121 as_references_(as_references) {} |
| 1127 | 1122 |
| 1128 virtual void VisitPointers(RawObject** first, RawObject** last); | 1123 virtual void VisitPointers(RawObject** first, RawObject** last); |
| 1129 | 1124 |
| 1130 private: | 1125 private: |
| 1131 SnapshotWriter* writer_; | 1126 SnapshotWriter* writer_; |
| 1132 bool as_references_; | 1127 bool as_references_; |
| 1133 | 1128 |
| 1134 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 1129 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
| 1135 }; | 1130 }; |
| 1136 | 1131 |
| 1137 } // namespace dart | 1132 } // namespace dart |
| 1138 | 1133 |
| 1139 #endif // VM_SNAPSHOT_H_ | 1134 #endif // VM_SNAPSHOT_H_ |
| OLD | NEW |