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 cls = Class::NewExternalTypedDataClass(kExternalTypedDataUint8ArrayCid); | |
hausner
2015/05/21 20:37:12
You don't use the value of cls anywhere. Is this l
siva
2015/05/22 18:09:27
The class kExternalTypedDataUint8ArrayCid needs to
| |
604 | 611 |
605 // Allocate and initialize the empty_array instance. | 612 // Allocate and initialize the empty_array instance. |
606 { | 613 { |
607 uword address = heap->Allocate(Array::InstanceSize(0), Heap::kOld); | 614 uword address = heap->Allocate(Array::InstanceSize(0), Heap::kOld); |
608 InitializeObject(address, kArrayCid, Array::InstanceSize(0)); | 615 InitializeObject(address, kArrayCid, Array::InstanceSize(0)); |
609 Array::initializeHandle( | 616 Array::initializeHandle( |
610 empty_array_, | 617 empty_array_, |
611 reinterpret_cast<RawArray*>(address + kHeapObjectTag)); | 618 reinterpret_cast<RawArray*>(address + kHeapObjectTag)); |
612 empty_array_->StoreSmi(&empty_array_->raw_ptr()->length_, Smi::New(0)); | 619 empty_array_->StoreSmi(&empty_array_->raw_ptr()->length_, Smi::New(0)); |
613 } | 620 } |
(...skipping 20116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
20730 return tag_label.ToCString(); | 20737 return tag_label.ToCString(); |
20731 } | 20738 } |
20732 | 20739 |
20733 | 20740 |
20734 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20741 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
20735 Instance::PrintJSONImpl(stream, ref); | 20742 Instance::PrintJSONImpl(stream, ref); |
20736 } | 20743 } |
20737 | 20744 |
20738 | 20745 |
20739 } // namespace dart | 20746 } // namespace dart |
OLD | NEW |