| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/code_generator.h" | 7 #include "vm/code_generator.h" |
| 8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
| 9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 cls = object_store->double_class(); | 212 cls = object_store->double_class(); |
| 213 ASSERT(Double::InstanceSize() == cls.instance_size()); | 213 ASSERT(Double::InstanceSize() == cls.instance_size()); |
| 214 cls = object_store->bool_class(); | 214 cls = object_store->bool_class(); |
| 215 ASSERT(Bool::InstanceSize() == cls.instance_size()); | 215 ASSERT(Bool::InstanceSize() == cls.instance_size()); |
| 216 cls = object_store->array_class(); | 216 cls = object_store->array_class(); |
| 217 ASSERT(Array::InstanceSize() == cls.instance_size()); | 217 ASSERT(Array::InstanceSize() == cls.instance_size()); |
| 218 cls = object_store->immutable_array_class(); | 218 cls = object_store->immutable_array_class(); |
| 219 ASSERT(ImmutableArray::InstanceSize() == cls.instance_size()); | 219 ASSERT(ImmutableArray::InstanceSize() == cls.instance_size()); |
| 220 cls = object_store->weak_property_class(); | 220 cls = object_store->weak_property_class(); |
| 221 ASSERT(WeakProperty::InstanceSize() == cls.instance_size()); | 221 ASSERT(WeakProperty::InstanceSize() == cls.instance_size()); |
| 222 cls = object_store->linked_hash_map_class(); |
| 223 ASSERT(LinkedHashMap::InstanceSize() == cls.instance_size()); |
| 222 #endif // defined(DEBUG) | 224 #endif // defined(DEBUG) |
| 223 | 225 |
| 224 // Remember the currently pending classes. | 226 // Remember the currently pending classes. |
| 225 const GrowableObjectArray& class_array = | 227 const GrowableObjectArray& class_array = |
| 226 GrowableObjectArray::Handle(object_store->pending_classes()); | 228 GrowableObjectArray::Handle(object_store->pending_classes()); |
| 227 for (intptr_t i = 0; i < class_array.Length(); i++) { | 229 for (intptr_t i = 0; i < class_array.Length(); i++) { |
| 228 // TODO(iposva): Add real checks. | 230 // TODO(iposva): Add real checks. |
| 229 cls ^= class_array.At(i); | 231 cls ^= class_array.At(i); |
| 230 if (cls.is_finalized() || cls.is_prefinalized()) { | 232 if (cls.is_finalized() || cls.is_prefinalized()) { |
| 231 // Pre-finalized bootstrap classes must not define any fields. | 233 // Pre-finalized bootstrap classes must not define any fields. |
| (...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3180 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); | 3182 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); |
| 3181 field ^= fields_array.At(0); | 3183 field ^= fields_array.At(0); |
| 3182 ASSERT(field.Offset() == ByteBuffer::data_offset()); | 3184 ASSERT(field.Offset() == ByteBuffer::data_offset()); |
| 3183 name ^= field.name(); | 3185 name ^= field.name(); |
| 3184 expected_name ^= String::New("_data"); | 3186 expected_name ^= String::New("_data"); |
| 3185 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 3187 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
| 3186 #endif | 3188 #endif |
| 3187 } | 3189 } |
| 3188 | 3190 |
| 3189 } // namespace dart | 3191 } // namespace dart |
| OLD | NEW |