| 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 RUNTIME_VM_DATASTREAM_H_ | 5 #ifndef RUNTIME_VM_DATASTREAM_H_ |
| 6 #define RUNTIME_VM_DATASTREAM_H_ | 6 #define RUNTIME_VM_DATASTREAM_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "platform/utils.h" | 9 #include "platform/utils.h" |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 } | 280 } |
| 281 | 281 |
| 282 private: | 282 private: |
| 283 const uint8_t* buffer_; | 283 const uint8_t* buffer_; |
| 284 const uint8_t* current_; | 284 const uint8_t* current_; |
| 285 const uint8_t* end_; | 285 const uint8_t* end_; |
| 286 | 286 |
| 287 DISALLOW_COPY_AND_ASSIGN(ReadStream); | 287 DISALLOW_COPY_AND_ASSIGN(ReadStream); |
| 288 }; | 288 }; |
| 289 | 289 |
| 290 | |
| 291 // Stream for writing various types into a buffer. | 290 // Stream for writing various types into a buffer. |
| 292 class WriteStream : public ValueObject { | 291 class WriteStream : public ValueObject { |
| 293 public: | 292 public: |
| 294 WriteStream(uint8_t** buffer, ReAlloc alloc, intptr_t initial_size) | 293 WriteStream(uint8_t** buffer, ReAlloc alloc, intptr_t initial_size) |
| 295 : buffer_(buffer), | 294 : buffer_(buffer), |
| 296 end_(NULL), | 295 end_(NULL), |
| 297 current_(NULL), | 296 current_(NULL), |
| 298 current_size_(0), | 297 current_size_(0), |
| 299 alloc_(alloc), | 298 alloc_(alloc), |
| 300 initial_size_(initial_size) { | 299 initial_size_(initial_size) { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 intptr_t current_size_; | 457 intptr_t current_size_; |
| 459 ReAlloc alloc_; | 458 ReAlloc alloc_; |
| 460 intptr_t initial_size_; | 459 intptr_t initial_size_; |
| 461 | 460 |
| 462 DISALLOW_COPY_AND_ASSIGN(WriteStream); | 461 DISALLOW_COPY_AND_ASSIGN(WriteStream); |
| 463 }; | 462 }; |
| 464 | 463 |
| 465 } // namespace dart | 464 } // namespace dart |
| 466 | 465 |
| 467 #endif // RUNTIME_VM_DATASTREAM_H_ | 466 #endif // RUNTIME_VM_DATASTREAM_H_ |
| OLD | NEW |