| 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 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1676 // ApplyMixinAppAlias. | 1676 // ApplyMixinAppAlias. |
| 1677 // Unfinalized type parameters replace finalized type parameters, which | 1677 // Unfinalized type parameters replace finalized type parameters, which |
| 1678 // is not a problem since they will get finalized shortly as the mixin | 1678 // is not a problem since they will get finalized shortly as the mixin |
| 1679 // application class gets finalized. | 1679 // application class gets finalized. |
| 1680 if (has_uninstantiated_bounds && !mixin_class.is_mixin_app_alias()) { | 1680 if (has_uninstantiated_bounds && !mixin_class.is_mixin_app_alias()) { |
| 1681 Error& bound_error = Error::Handle(isolate); | 1681 Error& bound_error = Error::Handle(isolate); |
| 1682 for (intptr_t i = 0; i < num_mixin_type_params; i++) { | 1682 for (intptr_t i = 0; i < num_mixin_type_params; i++) { |
| 1683 param ^= mixin_type_args.TypeAt(i); | 1683 param ^= mixin_type_args.TypeAt(i); |
| 1684 param_bound = param.bound(); | 1684 param_bound = param.bound(); |
| 1685 if (!param_bound.IsInstantiated()) { | 1685 if (!param_bound.IsInstantiated()) { |
| 1686 // Make sure the bound is finalized before instantiating it. |
| 1687 if (!param_bound.IsFinalized() && |
| 1688 !param_bound.IsBeingFinalized()) { |
| 1689 param_bound = |
| 1690 FinalizeType(mixin_app_class, param_bound, kCanonicalize); |
| 1691 param.set_bound(param_bound); // In case part of recursive type. |
| 1692 } |
| 1686 param_bound = param_bound.InstantiateFrom(mixin_type_args, | 1693 param_bound = param_bound.InstantiateFrom(mixin_type_args, |
| 1687 &bound_error); | 1694 &bound_error); |
| 1688 // The instantiator contains only TypeParameter objects and no | 1695 // The instantiator contains only TypeParameter objects and no |
| 1689 // BoundedType objects, so no bound error may occur. | 1696 // BoundedType objects, so no bound error may occur. |
| 1690 ASSERT(bound_error.IsNull()); | 1697 ASSERT(bound_error.IsNull()); |
| 1691 ASSERT(!param_bound.IsInstantiated()); | 1698 ASSERT(!param_bound.IsInstantiated()); |
| 1692 param.set_bound(param_bound); | 1699 param.set_bound(param_bound); |
| 1693 } | 1700 } |
| 1694 } | 1701 } |
| 1695 } | 1702 } |
| (...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3172 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); | 3179 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); |
| 3173 field ^= fields_array.At(0); | 3180 field ^= fields_array.At(0); |
| 3174 ASSERT(field.Offset() == ByteBuffer::data_offset()); | 3181 ASSERT(field.Offset() == ByteBuffer::data_offset()); |
| 3175 name ^= field.name(); | 3182 name ^= field.name(); |
| 3176 expected_name ^= String::New("_data"); | 3183 expected_name ^= String::New("_data"); |
| 3177 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 3184 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
| 3178 #endif | 3185 #endif |
| 3179 } | 3186 } |
| 3180 | 3187 |
| 3181 } // namespace dart | 3188 } // namespace dart |
| OLD | NEW |