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

Side by Side Diff: runtime/vm/snapshot.cc

Issue 9091016: Fix sign extension issue with clang/gcc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « no previous file | no next file » | 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) 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 #include "vm/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "vm/assert.h" 7 #include "vm/assert.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // - Object that is seen for the first time (inlined as follows): 250 // - Object that is seen for the first time (inlined as follows):
251 // (object size in multiples of kObjectAlignment | 0x1) 251 // (object size in multiples of kObjectAlignment | 0x1)
252 // serialized fields of the object 252 // serialized fields of the object
253 // ...... 253 // ......
254 254
255 NoGCScope no_gc; 255 NoGCScope no_gc;
256 // writing a snap shot. 256 // writing a snap shot.
257 257
258 // First check if it is a Smi (i.e not a heap object). 258 // First check if it is a Smi (i.e not a heap object).
259 if (!rawobj->IsHeapObject()) { 259 if (!rawobj->IsHeapObject()) {
260 Write<int64_t>(reinterpret_cast<int64_t>(rawobj)); 260 Write<int64_t>(reinterpret_cast<intptr_t>(rawobj));
261 return; 261 return;
262 } 262 }
263 263
264 // Check if it is a singleton null object which is shared by all isolates. 264 // Check if it is a singleton null object which is shared by all isolates.
265 if (rawobj == Object::null()) { 265 if (rawobj == Object::null()) {
266 WriteIndexedObject(Object::kNullObject); 266 WriteIndexedObject(Object::kNullObject);
267 return; 267 return;
268 } 268 }
269 269
270 // Check if it is a singleton sentinel object which is shared by all isolates. 270 // Check if it is a singleton sentinel object which is shared by all isolates.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 445
446 446
447 void SnapshotWriterVisitor::VisitPointers(RawObject** first, RawObject** last) { 447 void SnapshotWriterVisitor::VisitPointers(RawObject** first, RawObject** last) {
448 for (RawObject** current = first; current <= last; current++) { 448 for (RawObject** current = first; current <= last; current++) {
449 RawObject* raw_obj = *current; 449 RawObject* raw_obj = *current;
450 writer_->WriteObject(raw_obj); 450 writer_->WriteObject(raw_obj);
451 } 451 }
452 } 452 }
453 453
454 } // namespace dart 454 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698