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

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

Issue 10876100: Convert double interface into abstract class (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
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 #include "vm/dart_api_message.h" 5 #include "vm/dart_api_message.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/snapshot_ids.h" 7 #include "vm/snapshot_ids.h"
8 #include "vm/symbols.h" 8 #include "vm/symbols.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 381
382 Dart_CObject* ApiMessageReader::ReadIndexedObject(intptr_t object_id) { 382 Dart_CObject* ApiMessageReader::ReadIndexedObject(intptr_t object_id) {
383 if (object_id == kTrueValue) { 383 if (object_id == kTrueValue) {
384 return AllocateDartCObjectBool(true); 384 return AllocateDartCObjectBool(true);
385 } 385 }
386 if (object_id == kFalseValue) { 386 if (object_id == kFalseValue) {
387 return AllocateDartCObjectBool(false); 387 return AllocateDartCObjectBool(false);
388 } 388 }
389 if (object_id == kDynamicType || 389 if (object_id == kDynamicType ||
390 object_id == kDoubleInterface || 390 object_id == kDoubleType ||
391 object_id == kIntInterface || 391 object_id == kIntInterface ||
392 object_id == kBoolInterface || 392 object_id == kBoolInterface ||
393 object_id == kStringInterface) { 393 object_id == kStringInterface) {
394 // Always return dynamic type (this is only a marker). 394 // Always return dynamic type (this is only a marker).
395 return &dynamic_type_marker; 395 return &dynamic_type_marker;
396 } 396 }
397 intptr_t index = object_id - kMaxPredefinedObjectIds; 397 intptr_t index = object_id - kMaxPredefinedObjectIds;
398 ASSERT((0 <= index) && (index < backward_references_.length())); 398 ASSERT((0 <= index) && (index < backward_references_.length()));
399 ASSERT(backward_references_[index]->reference() != NULL); 399 ASSERT(backward_references_[index]->reference() != NULL);
400 return backward_references_[index]->reference(); 400 return backward_references_[index]->reference();
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 // not been serialized yet. These would typically be fields of arrays. 779 // not been serialized yet. These would typically be fields of arrays.
780 // NOTE: The forward list might grow as we process the list. 780 // NOTE: The forward list might grow as we process the list.
781 for (intptr_t i = 0; i < forward_id_; i++) { 781 for (intptr_t i = 0; i < forward_id_; i++) {
782 WriteForwardedCObject(forward_list_[i]); 782 WriteForwardedCObject(forward_list_[i]);
783 } 783 }
784 UnmarkAllCObjects(object); 784 UnmarkAllCObjects(object);
785 FinalizeBuffer(); 785 FinalizeBuffer();
786 } 786 }
787 787
788 } // namespace dart 788 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698