| OLD | NEW |
| 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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 ASSERT(public_class_name.Length() > 0); | 895 ASSERT(public_class_name.Length() > 0); |
| 896 ASSERT(public_class_name.CharAt(0) == '_'); | 896 ASSERT(public_class_name.CharAt(0) == '_'); |
| 897 String& str = String::Handle(); | 897 String& str = String::Handle(); |
| 898 str = lib.PrivateName(public_class_name); | 898 str = lib.PrivateName(public_class_name); |
| 899 cls.set_name(str); | 899 cls.set_name(str); |
| 900 lib.AddClass(cls); | 900 lib.AddClass(cls); |
| 901 } | 901 } |
| 902 | 902 |
| 903 | 903 |
| 904 RawError* Object::Init(Isolate* isolate) { | 904 RawError* Object::Init(Isolate* isolate) { |
| 905 TIMERSCOPE(time_bootstrap); | 905 TIMERSCOPE(isolate, time_bootstrap); |
| 906 ObjectStore* object_store = isolate->object_store(); | 906 ObjectStore* object_store = isolate->object_store(); |
| 907 | 907 |
| 908 Class& cls = Class::Handle(); | 908 Class& cls = Class::Handle(); |
| 909 Type& type = Type::Handle(); | 909 Type& type = Type::Handle(); |
| 910 Array& array = Array::Handle(); | 910 Array& array = Array::Handle(); |
| 911 Library& lib = Library::Handle(); | 911 Library& lib = Library::Handle(); |
| 912 | 912 |
| 913 // All RawArray fields will be initialized to an empty array, therefore | 913 // All RawArray fields will be initialized to an empty array, therefore |
| 914 // initialize array class first. | 914 // initialize array class first. |
| 915 cls = Class::New<Array>(); | 915 cls = Class::New<Array>(); |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 Intrinsifier::InitializeState(); | 1329 Intrinsifier::InitializeState(); |
| 1330 | 1330 |
| 1331 // Set up recognized state of all functions (core, math and typed data). | 1331 // Set up recognized state of all functions (core, math and typed data). |
| 1332 MethodRecognizer::InitializeState(); | 1332 MethodRecognizer::InitializeState(); |
| 1333 | 1333 |
| 1334 return Error::null(); | 1334 return Error::null(); |
| 1335 } | 1335 } |
| 1336 | 1336 |
| 1337 | 1337 |
| 1338 void Object::InitFromSnapshot(Isolate* isolate) { | 1338 void Object::InitFromSnapshot(Isolate* isolate) { |
| 1339 TIMERSCOPE(time_bootstrap); | 1339 TIMERSCOPE(isolate, time_bootstrap); |
| 1340 ObjectStore* object_store = isolate->object_store(); | 1340 ObjectStore* object_store = isolate->object_store(); |
| 1341 | 1341 |
| 1342 Class& cls = Class::Handle(); | 1342 Class& cls = Class::Handle(); |
| 1343 | 1343 |
| 1344 // Set up empty classes in the object store, these will get | 1344 // Set up empty classes in the object store, these will get |
| 1345 // initialized correctly when we read from the snapshot. | 1345 // initialized correctly when we read from the snapshot. |
| 1346 // This is done to allow bootstrapping of reading classes from the snapshot. | 1346 // This is done to allow bootstrapping of reading classes from the snapshot. |
| 1347 cls = Class::New<Instance>(kInstanceCid); | 1347 cls = Class::New<Instance>(kInstanceCid); |
| 1348 object_store->set_object_class(cls); | 1348 object_store->set_object_class(cls); |
| 1349 | 1349 |
| (...skipping 16285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17635 return "_MirrorReference"; | 17635 return "_MirrorReference"; |
| 17636 } | 17636 } |
| 17637 | 17637 |
| 17638 | 17638 |
| 17639 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 17639 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
| 17640 Instance::PrintToJSONStream(stream, ref); | 17640 Instance::PrintToJSONStream(stream, ref); |
| 17641 } | 17641 } |
| 17642 | 17642 |
| 17643 | 17643 |
| 17644 } // namespace dart | 17644 } // namespace dart |
| OLD | NEW |