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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 cls.set_num_own_type_arguments(1); | 594 cls.set_num_own_type_arguments(1); |
595 cls = Class::New<Array>(kImmutableArrayCid); | 595 cls = Class::New<Array>(kImmutableArrayCid); |
596 isolate->object_store()->set_immutable_array_class(cls); | 596 isolate->object_store()->set_immutable_array_class(cls); |
597 cls.set_type_arguments_field_offset(Array::type_arguments_offset()); | 597 cls.set_type_arguments_field_offset(Array::type_arguments_offset()); |
598 cls.set_num_type_arguments(1); | 598 cls.set_num_type_arguments(1); |
599 cls.set_num_own_type_arguments(1); | 599 cls.set_num_own_type_arguments(1); |
600 cls = Class::NewStringClass(kOneByteStringCid); | 600 cls = Class::NewStringClass(kOneByteStringCid); |
601 isolate->object_store()->set_one_byte_string_class(cls); | 601 isolate->object_store()->set_one_byte_string_class(cls); |
602 cls = Class::NewStringClass(kTwoByteStringCid); | 602 cls = Class::NewStringClass(kTwoByteStringCid); |
603 isolate->object_store()->set_two_byte_string_class(cls); | 603 isolate->object_store()->set_two_byte_string_class(cls); |
| 604 cls = Class::New<Mint>(); |
| 605 isolate->object_store()->set_mint_class(cls); |
| 606 cls = Class::New<Bigint>(); |
| 607 isolate->object_store()->set_bigint_class(cls); |
| 608 cls = Class::New<Double>(); |
| 609 isolate->object_store()->set_double_class(cls); |
| 610 |
| 611 // Ensure that class kExternalTypedDataUint8ArrayCid is registered as we |
| 612 // need it when reading in the token stream of bootstrap classes in the VM |
| 613 // isolate. |
| 614 Class::NewExternalTypedDataClass(kExternalTypedDataUint8ArrayCid); |
604 | 615 |
605 // Allocate and initialize the empty_array instance. | 616 // Allocate and initialize the empty_array instance. |
606 { | 617 { |
607 uword address = heap->Allocate(Array::InstanceSize(0), Heap::kOld); | 618 uword address = heap->Allocate(Array::InstanceSize(0), Heap::kOld); |
608 InitializeObject(address, kArrayCid, Array::InstanceSize(0)); | 619 InitializeObject(address, kArrayCid, Array::InstanceSize(0)); |
609 Array::initializeHandle( | 620 Array::initializeHandle( |
610 empty_array_, | 621 empty_array_, |
611 reinterpret_cast<RawArray*>(address + kHeapObjectTag)); | 622 reinterpret_cast<RawArray*>(address + kHeapObjectTag)); |
612 empty_array_->StoreSmi(&empty_array_->raw_ptr()->length_, Smi::New(0)); | 623 empty_array_->StoreSmi(&empty_array_->raw_ptr()->length_, Smi::New(0)); |
613 } | 624 } |
(...skipping 20116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20730 return tag_label.ToCString(); | 20741 return tag_label.ToCString(); |
20731 } | 20742 } |
20732 | 20743 |
20733 | 20744 |
20734 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20745 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
20735 Instance::PrintJSONImpl(stream, ref); | 20746 Instance::PrintJSONImpl(stream, ref); |
20736 } | 20747 } |
20737 | 20748 |
20738 | 20749 |
20739 } // namespace dart | 20750 } // namespace dart |
OLD | NEW |