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

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

Issue 11085003: Convert String to a class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove left-over List change in comment. Created 8 years, 2 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/snapshot.h" 5 #include "vm/snapshot.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 case kNullType: return object_store->null_type(); 59 case kNullType: return object_store->null_type();
60 case kDynamicType: return object_store->dynamic_type(); 60 case kDynamicType: return object_store->dynamic_type();
61 case kVoidType: return object_store->void_type(); 61 case kVoidType: return object_store->void_type();
62 case kFunctionType: return object_store->function_type(); 62 case kFunctionType: return object_store->function_type();
63 case kNumberType: return object_store->number_type(); 63 case kNumberType: return object_store->number_type();
64 case kSmiType: return object_store->smi_type(); 64 case kSmiType: return object_store->smi_type();
65 case kMintType: return object_store->mint_type(); 65 case kMintType: return object_store->mint_type();
66 case kDoubleType: return object_store->double_type(); 66 case kDoubleType: return object_store->double_type();
67 case kIntType: return object_store->int_type(); 67 case kIntType: return object_store->int_type();
68 case kBoolType: return object_store->bool_type(); 68 case kBoolType: return object_store->bool_type();
69 case kStringInterface: return object_store->string_interface(); 69 case kStringType: return object_store->string_type();
70 case kListInterface: return object_store->list_interface(); 70 case kListInterface: return object_store->list_interface();
71 default: break; 71 default: break;
72 } 72 }
73 UNREACHABLE(); 73 UNREACHABLE();
74 return Type::null(); 74 return Type::null();
75 } 75 }
76 76
77 77
78 static int GetTypeIndex(ObjectStore* object_store, const RawType* raw_type) { 78 static int GetTypeIndex(ObjectStore* object_store, const RawType* raw_type) {
79 ASSERT(raw_type->IsHeapObject()); 79 ASSERT(raw_type->IsHeapObject());
(...skipping 12 matching lines...) Expand all
92 } else if (raw_type == object_store->smi_type()) { 92 } else if (raw_type == object_store->smi_type()) {
93 return kSmiType; 93 return kSmiType;
94 } else if (raw_type == object_store->mint_type()) { 94 } else if (raw_type == object_store->mint_type()) {
95 return kMintType; 95 return kMintType;
96 } else if (raw_type == object_store->double_type()) { 96 } else if (raw_type == object_store->double_type()) {
97 return kDoubleType; 97 return kDoubleType;
98 } else if (raw_type == object_store->int_type()) { 98 } else if (raw_type == object_store->int_type()) {
99 return kIntType; 99 return kIntType;
100 } else if (raw_type == object_store->bool_type()) { 100 } else if (raw_type == object_store->bool_type()) {
101 return kBoolType; 101 return kBoolType;
102 } else if (raw_type == object_store->string_interface()) { 102 } else if (raw_type == object_store->string_type()) {
103 return kStringInterface; 103 return kStringType;
104 } else if (raw_type == object_store->list_interface()) { 104 } else if (raw_type == object_store->list_interface()) {
105 return kListInterface; 105 return kListInterface;
106 } 106 }
107 return kInvalidIndex; 107 return kInvalidIndex;
108 } 108 }
109 109
110 110
111 // TODO(5411462): Temporary setup of snapshot for testing purposes, 111 // TODO(5411462): Temporary setup of snapshot for testing purposes,
112 // the actual creation of a snapshot maybe done differently. 112 // the actual creation of a snapshot maybe done differently.
113 const Snapshot* Snapshot::SetupFromBuffer(const void* raw_memory) { 113 const Snapshot* Snapshot::SetupFromBuffer(const void* raw_memory) {
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 1182
1183 1183
1184 void MessageWriter::WriteMessage(const Object& obj) { 1184 void MessageWriter::WriteMessage(const Object& obj) {
1185 ASSERT(kind() == Snapshot::kMessage); 1185 ASSERT(kind() == Snapshot::kMessage);
1186 WriteObject(obj.raw()); 1186 WriteObject(obj.raw());
1187 UnmarkAll(); 1187 UnmarkAll();
1188 } 1188 }
1189 1189
1190 1190
1191 } // namespace dart 1191 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698