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 15666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15677 if (IsTypeParameter()) { | 15677 if (IsTypeParameter()) { |
15678 const TypeParameter& type_param = TypeParameter::Cast(*this); | 15678 const TypeParameter& type_param = TypeParameter::Cast(*this); |
15679 if (other.IsTypeParameter()) { | 15679 if (other.IsTypeParameter()) { |
15680 const TypeParameter& other_type_param = TypeParameter::Cast(other); | 15680 const TypeParameter& other_type_param = TypeParameter::Cast(other); |
15681 if (type_param.Equals(other_type_param)) { | 15681 if (type_param.Equals(other_type_param)) { |
15682 return true; | 15682 return true; |
15683 } | 15683 } |
15684 } | 15684 } |
15685 const AbstractType& bound = AbstractType::Handle(type_param.bound()); | 15685 const AbstractType& bound = AbstractType::Handle(type_param.bound()); |
15686 // We may be checking bounds at finalization time and can encounter | 15686 // We may be checking bounds at finalization time and can encounter |
15687 // a still unfinalized bound. | 15687 // a still unfinalized bound. Finalizing the bound here may lead to cycles. |
15688 if (!bound.IsFinalized() && !bound.IsBeingFinalized()) { | 15688 if (!bound.IsFinalized()) { |
15689 ClassFinalizer::FinalizeType( | 15689 return false; // TODO(regis): Return "maybe after instantiation". |
15690 Class::Handle(type_param.parameterized_class()), | |
15691 bound, | |
15692 ClassFinalizer::kCanonicalize); | |
15693 type_param.set_bound(bound); | |
15694 } | 15690 } |
15695 if (bound.IsMoreSpecificThan(other, bound_error)) { | 15691 if (bound.IsMoreSpecificThan(other, bound_error)) { |
15696 return true; | 15692 return true; |
15697 } | 15693 } |
15698 return false; // TODO(regis): We should return "maybe after instantiation". | 15694 return false; // TODO(regis): We should return "maybe after instantiation". |
15699 } | 15695 } |
15700 if (other.IsTypeParameter()) { | 15696 if (other.IsTypeParameter()) { |
15701 return false; // TODO(regis): We should return "maybe after instantiation". | 15697 return false; // TODO(regis): We should return "maybe after instantiation". |
15702 } | 15698 } |
15703 const Class& cls = Class::Handle(type_class()); | 15699 const Class& cls = Class::Handle(type_class()); |
(...skipping 6259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21963 return tag_label.ToCString(); | 21959 return tag_label.ToCString(); |
21964 } | 21960 } |
21965 | 21961 |
21966 | 21962 |
21967 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 21963 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
21968 Instance::PrintJSONImpl(stream, ref); | 21964 Instance::PrintJSONImpl(stream, ref); |
21969 } | 21965 } |
21970 | 21966 |
21971 | 21967 |
21972 } // namespace dart | 21968 } // namespace dart |
OLD | NEW |