| 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/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 RegisterClass(cls, name, core_impl_lib); | 617 RegisterClass(cls, name, core_impl_lib); |
| 618 pending_classes.Add(cls, Heap::kOld); | 618 pending_classes.Add(cls, Heap::kOld); |
| 619 // Super type set below, after Object is allocated. | 619 // Super type set below, after Object is allocated. |
| 620 | 620 |
| 621 cls = Class::New<JSRegExp>(); | 621 cls = Class::New<JSRegExp>(); |
| 622 object_store->set_jsregexp_class(cls); | 622 object_store->set_jsregexp_class(cls); |
| 623 name = Symbols::JSSyntaxRegExp(); | 623 name = Symbols::JSSyntaxRegExp(); |
| 624 RegisterClass(cls, name, core_impl_lib); | 624 RegisterClass(cls, name, core_impl_lib); |
| 625 pending_classes.Add(cls, Heap::kOld); | 625 pending_classes.Add(cls, Heap::kOld); |
| 626 | 626 |
| 627 cls = Class::New<WeakProperty>(); | |
| 628 object_store->set_weak_property_class(cls); | |
| 629 name = Symbols::WeakProperty(); | |
| 630 RegisterClass(cls, name, core_impl_lib); | |
| 631 pending_classes.Add(cls, Heap::kOld); | |
| 632 | |
| 633 // Initialize the base interfaces used by the core VM classes. | 627 // Initialize the base interfaces used by the core VM classes. |
| 634 const Script& script = Script::Handle(Bootstrap::LoadCoreScript(false)); | 628 const Script& script = Script::Handle(Bootstrap::LoadCoreScript(false)); |
| 635 | 629 |
| 636 // Allocate and initialize the Object class and type. The Object | 630 // Allocate and initialize the Object class and type. The Object |
| 637 // class and ByteArray subclasses are the only pre-allocated, | 631 // class and ByteArray subclasses are the only pre-allocated, |
| 638 // non-interface classes in the core library. | 632 // non-interface classes in the core library. |
| 639 cls = Class::New<Instance>(); | 633 cls = Class::New<Instance>(); |
| 640 object_store->set_object_class(cls); | 634 object_store->set_object_class(cls); |
| 641 name = Symbols::Object(); | 635 name = Symbols::Object(); |
| 642 cls.set_name(name); | 636 cls.set_name(name); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 cls = Class::New<ExternalFloat32Array>(); | 734 cls = Class::New<ExternalFloat32Array>(); |
| 741 object_store->set_external_float32_array_class(cls); | 735 object_store->set_external_float32_array_class(cls); |
| 742 name = Symbols::_ExternalFloat32Array(); | 736 name = Symbols::_ExternalFloat32Array(); |
| 743 RegisterPrivateClass(cls, name, core_lib); | 737 RegisterPrivateClass(cls, name, core_lib); |
| 744 | 738 |
| 745 cls = Class::New<ExternalFloat64Array>(); | 739 cls = Class::New<ExternalFloat64Array>(); |
| 746 object_store->set_external_float64_array_class(cls); | 740 object_store->set_external_float64_array_class(cls); |
| 747 name = Symbols::_ExternalFloat64Array(); | 741 name = Symbols::_ExternalFloat64Array(); |
| 748 RegisterPrivateClass(cls, name, core_lib); | 742 RegisterPrivateClass(cls, name, core_lib); |
| 749 | 743 |
| 744 cls = Class::New<WeakProperty>(); |
| 745 object_store->set_weak_property_class(cls); |
| 746 name = Symbols::WeakProperty(); |
| 747 RegisterClass(cls, name, core_lib); |
| 748 |
| 750 // Set the super type of class Stacktrace to Object type so that the | 749 // Set the super type of class Stacktrace to Object type so that the |
| 751 // 'toString' method is implemented. | 750 // 'toString' method is implemented. |
| 752 cls = object_store->stacktrace_class(); | 751 cls = object_store->stacktrace_class(); |
| 753 cls.set_super_type(type); | 752 cls.set_super_type(type); |
| 754 | 753 |
| 755 cls = CreateAndRegisterInterface("Function", script, core_lib); | 754 cls = CreateAndRegisterInterface("Function", script, core_lib); |
| 756 pending_classes.Add(cls, Heap::kOld); | 755 pending_classes.Add(cls, Heap::kOld); |
| 757 type = Type::NewNonParameterizedType(cls); | 756 type = Type::NewNonParameterizedType(cls); |
| 758 object_store->set_function_interface(type); | 757 object_store->set_function_interface(type); |
| 759 | 758 |
| (...skipping 10381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11141 } | 11140 } |
| 11142 return result.raw(); | 11141 return result.raw(); |
| 11143 } | 11142 } |
| 11144 | 11143 |
| 11145 | 11144 |
| 11146 const char* WeakProperty::ToCString() const { | 11145 const char* WeakProperty::ToCString() const { |
| 11147 return "WeakProperty"; | 11146 return "WeakProperty"; |
| 11148 } | 11147 } |
| 11149 | 11148 |
| 11150 } // namespace dart | 11149 } // namespace dart |
| OLD | NEW |