| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 return *current_++; | 187 return *current_++; |
| 188 } | 188 } |
| 189 | 189 |
| 190 private: | 190 private: |
| 191 const uint8_t* buffer_; | 191 const uint8_t* buffer_; |
| 192 const uint8_t* current_; | 192 const uint8_t* current_; |
| 193 const uint8_t* end_; | 193 const uint8_t* end_; |
| 194 | 194 |
| 195 // SnapshotReader needs access to the private Raw classes. | 195 // SnapshotReader needs access to the private Raw classes. |
| 196 friend class SnapshotReader; | 196 friend class SnapshotReader; |
| 197 friend class CMessageReader; | 197 friend class BaseReader; |
| 198 DISALLOW_COPY_AND_ASSIGN(ReadStream); | 198 DISALLOW_COPY_AND_ASSIGN(ReadStream); |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 | 201 |
| 202 // Stream for writing various types into a buffer. | 202 // Stream for writing various types into a buffer. |
| 203 class WriteStream : public ValueObject { | 203 class WriteStream : public ValueObject { |
| 204 public: | 204 public: |
| 205 static const int kBufferIncrementSize = 64 * KB; | 205 static const int kBufferIncrementSize = 64 * KB; |
| 206 | 206 |
| 207 WriteStream(uint8_t** buffer, ReAlloc alloc) : | 207 WriteStream(uint8_t** buffer, ReAlloc alloc) : |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 | 607 |
| 608 private: | 608 private: |
| 609 SnapshotWriter* writer_; | 609 SnapshotWriter* writer_; |
| 610 | 610 |
| 611 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); | 611 DISALLOW_COPY_AND_ASSIGN(SnapshotWriterVisitor); |
| 612 }; | 612 }; |
| 613 | 613 |
| 614 } // namespace dart | 614 } // namespace dart |
| 615 | 615 |
| 616 #endif // VM_SNAPSHOT_H_ | 616 #endif // VM_SNAPSHOT_H_ |
| OLD | NEW |