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

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

Issue 11085003: Convert String to a class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merged to tip of bleeding_edge. Updated test expecteation Created 8 years, 1 month 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/class_finalizer.cc ('k') | runtime/vm/flow_graph_compiler_ia32.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 #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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 if (object_id == kTrueValue) { 403 if (object_id == kTrueValue) {
404 return AllocateDartCObjectBool(true); 404 return AllocateDartCObjectBool(true);
405 } 405 }
406 if (object_id == kFalseValue) { 406 if (object_id == kFalseValue) {
407 return AllocateDartCObjectBool(false); 407 return AllocateDartCObjectBool(false);
408 } 408 }
409 if (object_id == kDynamicType || 409 if (object_id == kDynamicType ||
410 object_id == kDoubleType || 410 object_id == kDoubleType ||
411 object_id == kIntType || 411 object_id == kIntType ||
412 object_id == kBoolType || 412 object_id == kBoolType ||
413 object_id == kStringInterface) { 413 object_id == kStringType) {
414 // Always return dynamic type (this is only a marker). 414 // Always return dynamic type (this is only a marker).
415 return &dynamic_type_marker; 415 return &dynamic_type_marker;
416 } 416 }
417 intptr_t index = object_id - kMaxPredefinedObjectIds; 417 intptr_t index = object_id - kMaxPredefinedObjectIds;
418 ASSERT((0 <= index) && (index < backward_references_.length())); 418 ASSERT((0 <= index) && (index < backward_references_.length()));
419 ASSERT(backward_references_[index]->reference() != NULL); 419 ASSERT(backward_references_[index]->reference() != NULL);
420 return backward_references_[index]->reference(); 420 return backward_references_[index]->reference();
421 } 421 }
422 422
423 423
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 // Write out all objects that were added to the forward list and have 796 // Write out all objects that were added to the forward list and have
797 // not been serialized yet. These would typically be fields of arrays. 797 // not been serialized yet. These would typically be fields of arrays.
798 // NOTE: The forward list might grow as we process the list. 798 // NOTE: The forward list might grow as we process the list.
799 for (intptr_t i = 0; i < forward_id_; i++) { 799 for (intptr_t i = 0; i < forward_id_; i++) {
800 WriteForwardedCObject(forward_list_[i]); 800 WriteForwardedCObject(forward_list_[i]);
801 } 801 }
802 UnmarkAllCObjects(object); 802 UnmarkAllCObjects(object);
803 } 803 }
804 804
805 } // namespace dart 805 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698