Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: runtime/vm/datastream.h

Issue 139043003: - Address warnings about 64-bit to 32-bit conversions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_DATASTREAM_H_ 5 #ifndef VM_DATASTREAM_H_
6 #define VM_DATASTREAM_H_ 6 #define 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 initial_size_)); 151 initial_size_));
152 if (*buffer_ == NULL) { 152 if (*buffer_ == NULL) {
153 Exceptions::ThrowOOM(); 153 Exceptions::ThrowOOM();
154 } 154 }
155 current_ = *buffer_; 155 current_ = *buffer_;
156 current_size_ = initial_size_; 156 current_size_ = initial_size_;
157 end_ = *buffer_ + initial_size_; 157 end_ = *buffer_ + initial_size_;
158 } 158 }
159 159
160 uint8_t* buffer() const { return *buffer_; } 160 uint8_t* buffer() const { return *buffer_; }
161 int bytes_written() const { return current_ - *buffer_; } 161 intptr_t bytes_written() const { return current_ - *buffer_; }
162 162
163 void set_current(uint8_t* value) { current_ = value; } 163 void set_current(uint8_t* value) { current_ = value; }
164 164
165 template<int N, typename T> 165 template<int N, typename T>
166 class Raw { }; 166 class Raw { };
167 167
168 template<typename T> 168 template<typename T>
169 class Raw<1, T> { 169 class Raw<1, T> {
170 public: 170 public:
171 static void Write(WriteStream* st, T value) { 171 static void Write(WriteStream* st, T value) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 intptr_t current_size_; 262 intptr_t current_size_;
263 ReAlloc alloc_; 263 ReAlloc alloc_;
264 intptr_t initial_size_; 264 intptr_t initial_size_;
265 265
266 DISALLOW_COPY_AND_ASSIGN(WriteStream); 266 DISALLOW_COPY_AND_ASSIGN(WriteStream);
267 }; 267 };
268 268
269 } // namespace dart 269 } // namespace dart
270 270
271 #endif // VM_DATASTREAM_H_ 271 #endif // VM_DATASTREAM_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698