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

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

Issue 8742028: Use ParametrizedType instead of Type where appropriate. Expand ToCString of type related classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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/raw_object_snapshot.cc ('k') | 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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 280
281 // Check if it is a singleton boolean false value. 281 // Check if it is a singleton boolean false value.
282 if (rawobj == object_store()->false_value()) { 282 if (rawobj == object_store()->false_value()) {
283 WriteObjectHeader(kObjectId, ObjectStore::kFalseValue); 283 WriteObjectHeader(kObjectId, ObjectStore::kFalseValue);
284 return; 284 return;
285 } 285 }
286 286
287 // Check if classes are not being serialized and it is preinitialized type. 287 // Check if classes are not being serialized and it is preinitialized type.
288 if (!serialize_classes_) { 288 if (!serialize_classes_) {
289 RawType* raw_type = reinterpret_cast<RawType*>(rawobj); 289 RawParameterizedType* raw_type =
290 reinterpret_cast<RawParameterizedType*>(rawobj);
290 index = object_store()->GetTypeIndex(raw_type); 291 index = object_store()->GetTypeIndex(raw_type);
291 if (index != ObjectStore::kInvalidIndex) { 292 if (index != ObjectStore::kInvalidIndex) {
292 WriteObjectHeader(kObjectId, index); 293 WriteObjectHeader(kObjectId, index);
293 return; 294 return;
294 } 295 }
295 } 296 }
296 297
297 // Now write the object out inline in the stream. 298 // Now write the object out inline in the stream.
298 WriteInlinedObject(rawobj); 299 WriteInlinedObject(rawobj);
299 } 300 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 428
428 429
429 void SnapshotWriterVisitor::VisitPointers(RawObject** first, RawObject** last) { 430 void SnapshotWriterVisitor::VisitPointers(RawObject** first, RawObject** last) {
430 for (RawObject** current = first; current <= last; current++) { 431 for (RawObject** current = first; current <= last; current++) {
431 RawObject* raw_obj = *current; 432 RawObject* raw_obj = *current;
432 writer_->WriteObject(raw_obj); 433 writer_->WriteObject(raw_obj);
433 } 434 }
434 } 435 }
435 436
436 } // namespace dart 437 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698