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/class_finalizer.h" | 5 #include "vm/class_finalizer.h" |
6 | 6 |
7 #include "vm/flags.h" | 7 #include "vm/flags.h" |
8 #include "vm/heap.h" | 8 #include "vm/heap.h" |
9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 cls = object_store->smi_class(); | 120 cls = object_store->smi_class(); |
121 ASSERT(Smi::InstanceSize() == cls.instance_size()); | 121 ASSERT(Smi::InstanceSize() == cls.instance_size()); |
122 cls = object_store->mint_class(); | 122 cls = object_store->mint_class(); |
123 ASSERT(Mint::InstanceSize() == cls.instance_size()); | 123 ASSERT(Mint::InstanceSize() == cls.instance_size()); |
124 cls = object_store->bigint_class(); | 124 cls = object_store->bigint_class(); |
125 ASSERT(Bigint::InstanceSize() == cls.instance_size()); | 125 ASSERT(Bigint::InstanceSize() == cls.instance_size()); |
126 cls = object_store->one_byte_string_class(); | 126 cls = object_store->one_byte_string_class(); |
127 ASSERT(OneByteString::InstanceSize() == cls.instance_size()); | 127 ASSERT(OneByteString::InstanceSize() == cls.instance_size()); |
128 cls = object_store->two_byte_string_class(); | 128 cls = object_store->two_byte_string_class(); |
129 ASSERT(TwoByteString::InstanceSize() == cls.instance_size()); | 129 ASSERT(TwoByteString::InstanceSize() == cls.instance_size()); |
130 cls = object_store->four_byte_string_class(); | |
131 ASSERT(FourByteString::InstanceSize() == cls.instance_size()); | |
132 cls = object_store->external_one_byte_string_class(); | 130 cls = object_store->external_one_byte_string_class(); |
133 ASSERT(ExternalOneByteString::InstanceSize() == cls.instance_size()); | 131 ASSERT(ExternalOneByteString::InstanceSize() == cls.instance_size()); |
134 cls = object_store->external_two_byte_string_class(); | 132 cls = object_store->external_two_byte_string_class(); |
135 ASSERT(ExternalTwoByteString::InstanceSize() == cls.instance_size()); | 133 ASSERT(ExternalTwoByteString::InstanceSize() == cls.instance_size()); |
136 cls = object_store->external_four_byte_string_class(); | |
137 ASSERT(ExternalFourByteString::InstanceSize() == cls.instance_size()); | |
138 cls = object_store->double_class(); | 134 cls = object_store->double_class(); |
139 ASSERT(Double::InstanceSize() == cls.instance_size()); | 135 ASSERT(Double::InstanceSize() == cls.instance_size()); |
140 cls = object_store->bool_class(); | 136 cls = object_store->bool_class(); |
141 ASSERT(Bool::InstanceSize() == cls.instance_size()); | 137 ASSERT(Bool::InstanceSize() == cls.instance_size()); |
142 cls = object_store->array_class(); | 138 cls = object_store->array_class(); |
143 ASSERT(Array::InstanceSize() == cls.instance_size()); | 139 ASSERT(Array::InstanceSize() == cls.instance_size()); |
144 cls = object_store->immutable_array_class(); | 140 cls = object_store->immutable_array_class(); |
145 ASSERT(ImmutableArray::InstanceSize() == cls.instance_size()); | 141 ASSERT(ImmutableArray::InstanceSize() == cls.instance_size()); |
146 cls = object_store->uint8_array_class(); | 142 cls = object_store->uint8_array_class(); |
147 ASSERT(Uint8Array::InstanceSize() == cls.instance_size()); | 143 ASSERT(Uint8Array::InstanceSize() == cls.instance_size()); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 bool is_error = false; | 258 bool is_error = false; |
263 switch (super_class.id()) { | 259 switch (super_class.id()) { |
264 case kNumberCid: | 260 case kNumberCid: |
265 case kIntegerCid: | 261 case kIntegerCid: |
266 case kSmiCid: | 262 case kSmiCid: |
267 case kMintCid: | 263 case kMintCid: |
268 case kBigintCid: | 264 case kBigintCid: |
269 case kDoubleCid: | 265 case kDoubleCid: |
270 case kOneByteStringCid: | 266 case kOneByteStringCid: |
271 case kTwoByteStringCid: | 267 case kTwoByteStringCid: |
272 case kFourByteStringCid: | |
273 case kExternalOneByteStringCid: | 268 case kExternalOneByteStringCid: |
274 case kExternalTwoByteStringCid: | 269 case kExternalTwoByteStringCid: |
275 case kExternalFourByteStringCid: | |
276 case kBoolCid: | 270 case kBoolCid: |
277 case kArrayCid: | 271 case kArrayCid: |
278 case kImmutableArrayCid: | 272 case kImmutableArrayCid: |
279 case kGrowableObjectArrayCid: | 273 case kGrowableObjectArrayCid: |
280 case kInt8ArrayCid: | 274 case kInt8ArrayCid: |
281 case kExternalInt8ArrayCid: | 275 case kExternalInt8ArrayCid: |
282 case kUint8ArrayCid: | 276 case kUint8ArrayCid: |
283 case kExternalUint8ArrayCid: | 277 case kExternalUint8ArrayCid: |
284 case kInt16ArrayCid: | 278 case kInt16ArrayCid: |
285 case kExternalInt16ArrayCid: | 279 case kExternalInt16ArrayCid: |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1602 void ClassFinalizer::ReportError(const char* format, ...) { | 1596 void ClassFinalizer::ReportError(const char* format, ...) { |
1603 va_list args; | 1597 va_list args; |
1604 va_start(args, format); | 1598 va_start(args, format); |
1605 const Error& error = Error::Handle( | 1599 const Error& error = Error::Handle( |
1606 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); | 1600 Parser::FormatError(Script::Handle(), -1, "Error", format, args)); |
1607 va_end(args); | 1601 va_end(args); |
1608 ReportError(error); | 1602 ReportError(error); |
1609 } | 1603 } |
1610 | 1604 |
1611 } // namespace dart | 1605 } // namespace dart |
OLD | NEW |