| 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/become.h" | 10 #include "vm/become.h" |
| (...skipping 18168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18179 bounded_type.InstantiateFrom(instantiator_type_arguments, bound_error, | 18179 bounded_type.InstantiateFrom(instantiator_type_arguments, bound_error, |
| 18180 instantiation_trail, bound_trail, space); | 18180 instantiation_trail, bound_trail, space); |
| 18181 // In case types of instantiator_type_arguments are not finalized | 18181 // In case types of instantiator_type_arguments are not finalized |
| 18182 // (or instantiated), then the instantiated_bounded_type is not finalized | 18182 // (or instantiated), then the instantiated_bounded_type is not finalized |
| 18183 // (or instantiated) either. | 18183 // (or instantiated) either. |
| 18184 // Note that instantiator_type_arguments must have the final length, though. | 18184 // Note that instantiator_type_arguments must have the final length, though. |
| 18185 } | 18185 } |
| 18186 if ((Isolate::Current()->type_checks()) && (bound_error != NULL) && | 18186 if ((Isolate::Current()->type_checks()) && (bound_error != NULL) && |
| 18187 bound_error->IsNull()) { | 18187 bound_error->IsNull()) { |
| 18188 AbstractType& upper_bound = AbstractType::Handle(bound()); | 18188 AbstractType& upper_bound = AbstractType::Handle(bound()); |
| 18189 ASSERT(upper_bound.IsFinalized()); | |
| 18190 ASSERT(!upper_bound.IsObjectType() && !upper_bound.IsDynamicType()); | 18189 ASSERT(!upper_bound.IsObjectType() && !upper_bound.IsDynamicType()); |
| 18191 AbstractType& instantiated_upper_bound = | 18190 AbstractType& instantiated_upper_bound = |
| 18192 AbstractType::Handle(upper_bound.raw()); | 18191 AbstractType::Handle(upper_bound.raw()); |
| 18193 if (!upper_bound.IsInstantiated()) { | 18192 if (upper_bound.IsFinalized() && !upper_bound.IsInstantiated()) { |
| 18194 instantiated_upper_bound = | 18193 instantiated_upper_bound = |
| 18195 upper_bound.InstantiateFrom(instantiator_type_arguments, bound_error, | 18194 upper_bound.InstantiateFrom(instantiator_type_arguments, bound_error, |
| 18196 instantiation_trail, bound_trail, space); | 18195 instantiation_trail, bound_trail, space); |
| 18197 // The instantiated_upper_bound may not be finalized or instantiated. | 18196 // The instantiated_upper_bound may not be finalized or instantiated. |
| 18198 // See comment above. | 18197 // See comment above. |
| 18199 } | 18198 } |
| 18200 if (bound_error->IsNull()) { | 18199 if (bound_error->IsNull()) { |
| 18201 // Shortcut the F-bounded case where we have reached a fixpoint. | 18200 // Shortcut the F-bounded case where we have reached a fixpoint. |
| 18202 if (instantiated_bounded_type.Equals(bounded_type) && | 18201 if (instantiated_bounded_type.Equals(bounded_type) && |
| 18203 instantiated_upper_bound.Equals(upper_bound)) { | 18202 instantiated_upper_bound.Equals(upper_bound)) { |
| (...skipping 4880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 23084 return UserTag::null(); | 23083 return UserTag::null(); |
| 23085 } | 23084 } |
| 23086 | 23085 |
| 23087 | 23086 |
| 23088 const char* UserTag::ToCString() const { | 23087 const char* UserTag::ToCString() const { |
| 23089 const String& tag_label = String::Handle(label()); | 23088 const String& tag_label = String::Handle(label()); |
| 23090 return tag_label.ToCString(); | 23089 return tag_label.ToCString(); |
| 23091 } | 23090 } |
| 23092 | 23091 |
| 23093 } // namespace dart | 23092 } // namespace dart |
| OLD | NEW |