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

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

Issue 18737004: List class was not initialized properly (it has type parameters). Do not preinitialize it incorrect… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 1069
1070 name = Symbols::New("String"); 1070 name = Symbols::New("String");
1071 cls = Class::New<Instance>(kIllegalCid); 1071 cls = Class::New<Instance>(kIllegalCid);
1072 cls.set_is_prefinalized(); 1072 cls.set_is_prefinalized();
1073 RegisterClass(cls, name, core_lib); 1073 RegisterClass(cls, name, core_lib);
1074 cls.set_is_prefinalized(); 1074 cls.set_is_prefinalized();
1075 pending_classes.Add(cls, Heap::kOld); 1075 pending_classes.Add(cls, Heap::kOld);
1076 type = Type::NewNonParameterizedType(cls); 1076 type = Type::NewNonParameterizedType(cls);
1077 object_store->set_string_type(type); 1077 object_store->set_string_type(type);
1078 1078
1079 cls = Class::New<Instance>(kIllegalCid);
1080 RegisterClass(cls, Symbols::List(), core_lib);
1081 cls.set_is_prefinalized();
1082 pending_classes.Add(cls, Heap::kOld);
1083 object_store->set_list_class(cls);
1084
1085 cls = object_store->bool_class(); 1079 cls = object_store->bool_class();
1086 type = Type::NewNonParameterizedType(cls); 1080 type = Type::NewNonParameterizedType(cls);
1087 object_store->set_bool_type(type); 1081 object_store->set_bool_type(type);
1088 1082
1089 cls = object_store->smi_class(); 1083 cls = object_store->smi_class();
1090 type = Type::NewNonParameterizedType(cls); 1084 type = Type::NewNonParameterizedType(cls);
1091 object_store->set_smi_type(type); 1085 object_store->set_smi_type(type);
1092 1086
1093 cls = object_store->mint_class(); 1087 cls = object_store->mint_class();
1094 type = Type::NewNonParameterizedType(cls); 1088 type = Type::NewNonParameterizedType(cls);
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 ASSERT(raw_ptr()->allocation_stub_ == Code::null()); 2314 ASSERT(raw_ptr()->allocation_stub_ == Code::null());
2321 StorePointer(&raw_ptr()->allocation_stub_, value.raw()); 2315 StorePointer(&raw_ptr()->allocation_stub_, value.raw());
2322 } 2316 }
2323 2317
2324 2318
2325 bool Class::IsFunctionClass() const { 2319 bool Class::IsFunctionClass() const {
2326 return raw() == Type::Handle(Type::Function()).type_class(); 2320 return raw() == Type::Handle(Type::Function()).type_class();
2327 } 2321 }
2328 2322
2329 2323
2330 bool Class::IsListClass() const {
2331 return raw() == Isolate::Current()->object_store()->list_class();
2332 }
2333
2334
2335 bool Class::IsCanonicalSignatureClass() const { 2324 bool Class::IsCanonicalSignatureClass() const {
2336 const Function& function = Function::Handle(signature_function()); 2325 const Function& function = Function::Handle(signature_function());
2337 return (!function.IsNull() && (function.signature_class() == raw())); 2326 return (!function.IsNull() && (function.signature_class() == raw()));
2338 } 2327 }
2339 2328
2340 2329
2341 // If test_kind == kIsSubtypeOf, checks if type S is a subtype of type T. 2330 // If test_kind == kIsSubtypeOf, checks if type S is a subtype of type T.
2342 // If test_kind == kIsMoreSpecificThan, checks if S is more specific than T. 2331 // If test_kind == kIsMoreSpecificThan, checks if S is more specific than T.
2343 // Type S is specified by this class parameterized with 'type_arguments', and 2332 // Type S is specified by this class parameterized with 'type_arguments', and
2344 // type T by class 'other' parameterized with 'other_type_arguments'. 2333 // type T by class 'other' parameterized with 'other_type_arguments'.
(...skipping 11811 matching lines...) Expand 10 before | Expand all | Expand 10 after
14156 } 14145 }
14157 14146
14158 14147
14159 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { 14148 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const {
14160 stream->OpenObject(); 14149 stream->OpenObject();
14161 stream->CloseObject(); 14150 stream->CloseObject();
14162 } 14151 }
14163 14152
14164 14153
14165 } // namespace dart 14154 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698