Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.element; | 8 library engine.element; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1049 * <blockquote>It is a compile-time error if a declared or derived mixin refer s to super. It is a | 1049 * <blockquote>It is a compile-time error if a declared or derived mixin refer s to super. It is a |
| 1050 * compile-time error if a declared or derived mixin explicitly declares a con structor. It is a | 1050 * compile-time error if a declared or derived mixin explicitly declares a con structor. It is a |
| 1051 * compile-time error if a mixin is derived from a class whose superclass is n ot | 1051 * compile-time error if a mixin is derived from a class whose superclass is n ot |
| 1052 * Object.</blockquote> | 1052 * Object.</blockquote> |
| 1053 * | 1053 * |
| 1054 * @return `true` if this class can validly be used as a mixin | 1054 * @return `true` if this class can validly be used as a mixin |
| 1055 */ | 1055 */ |
| 1056 bool get isValidMixin; | 1056 bool get isValidMixin; |
| 1057 | 1057 |
| 1058 /** | 1058 /** |
| 1059 * Return `true` if this mixin errors have already been reported for this | |
| 1060 * class. | |
| 1061 */ | |
| 1062 bool get mixinErrorsReported; | |
|
scheglov
2014/11/13 23:02:46
Do we really need to add it to the API?
Can we add
| |
| 1063 | |
| 1064 /** | |
| 1059 * Return the element representing the method that results from looking up the given method in | 1065 * Return the element representing the method that results from looking up the given method in |
| 1060 * this class with respect to the given library, ignoring abstract methods, or `null` if the | 1066 * this class with respect to the given library, ignoring abstract methods, or `null` if the |
| 1061 * look up fails. The behavior of this method is defined by the Dart Language Specification in | 1067 * look up fails. The behavior of this method is defined by the Dart Language Specification in |
| 1062 * section 12.15.1: <blockquote> The result of looking up method <i>m</i> in c lass <i>C</i> with | 1068 * section 12.15.1: <blockquote> The result of looking up method <i>m</i> in c lass <i>C</i> with |
| 1063 * respect to library <i>L</i> is: | 1069 * respect to library <i>L</i> is: |
| 1064 * * If <i>C</i> declares an instance method named <i>m</i> that is accessible to <i>L</i>, then | 1070 * * If <i>C</i> declares an instance method named <i>m</i> that is accessible to <i>L</i>, then |
| 1065 * that method is the result of the lookup. Otherwise, if <i>C</i> has a super class <i>S</i>, then | 1071 * that method is the result of the lookup. Otherwise, if <i>C</i> has a super class <i>S</i>, then |
| 1066 * the result of the lookup is the result of looking up method <i>m</i> in <i> S</i> with respect | 1072 * the result of the lookup is the result of looking up method <i>m</i> in <i> S</i> with respect |
| 1067 * to <i>L</i>. Otherwise, we say that the lookup has failed. | 1073 * to <i>L</i>. Otherwise, we say that the lookup has failed. |
| 1068 * </blockquote> | 1074 * </blockquote> |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1523 return true; | 1529 return true; |
| 1524 } | 1530 } |
| 1525 | 1531 |
| 1526 @override | 1532 @override |
| 1527 bool get isTypedef => hasModifier(Modifier.TYPEDEF); | 1533 bool get isTypedef => hasModifier(Modifier.TYPEDEF); |
| 1528 | 1534 |
| 1529 @override | 1535 @override |
| 1530 bool get isValidMixin => hasModifier(Modifier.MIXIN); | 1536 bool get isValidMixin => hasModifier(Modifier.MIXIN); |
| 1531 | 1537 |
| 1532 @override | 1538 @override |
| 1539 bool get mixinErrorsReported => hasModifier(Modifier.MIXIN_ERRORS_REPORTED); | |
| 1540 | |
| 1541 @override | |
| 1533 MethodElement lookUpConcreteMethod(String methodName, LibraryElement library) => _internalLookUpConcreteMethod(methodName, library, true); | 1542 MethodElement lookUpConcreteMethod(String methodName, LibraryElement library) => _internalLookUpConcreteMethod(methodName, library, true); |
| 1534 | 1543 |
| 1535 @override | 1544 @override |
| 1536 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library ) => _internalLookUpGetter(getterName, library, true); | 1545 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library ) => _internalLookUpGetter(getterName, library, true); |
| 1537 | 1546 |
| 1538 @override | 1547 @override |
| 1539 PropertyAccessorElement lookUpInheritedConcreteGetter(String getterName, Libra ryElement library) => _internalLookUpConcreteGetter(getterName, library, false); | 1548 PropertyAccessorElement lookUpInheritedConcreteGetter(String getterName, Libra ryElement library) => _internalLookUpConcreteGetter(getterName, library, false); |
| 1540 | 1549 |
| 1541 @override | 1550 @override |
| 1542 MethodElement lookUpInheritedConcreteMethod(String methodName, LibraryElement library) => _internalLookUpConcreteMethod(methodName, library, false); | 1551 MethodElement lookUpInheritedConcreteMethod(String methodName, LibraryElement library) => _internalLookUpConcreteMethod(methodName, library, false); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1622 * @param methods the methods contained in this class | 1631 * @param methods the methods contained in this class |
| 1623 */ | 1632 */ |
| 1624 void set methods(List<MethodElement> methods) { | 1633 void set methods(List<MethodElement> methods) { |
| 1625 for (MethodElement method in methods) { | 1634 for (MethodElement method in methods) { |
| 1626 (method as MethodElementImpl).enclosingElement = this; | 1635 (method as MethodElementImpl).enclosingElement = this; |
| 1627 } | 1636 } |
| 1628 this._methods = methods; | 1637 this._methods = methods; |
| 1629 } | 1638 } |
| 1630 | 1639 |
| 1631 /** | 1640 /** |
| 1641 * Set whether an error has reported explaining why this class is an | |
| 1642 * invalid mixin application. | |
| 1643 */ | |
| 1644 void set mixinErrorsReported(bool value) { | |
| 1645 setModifier(Modifier.MIXIN_ERRORS_REPORTED, value); | |
| 1646 } | |
| 1647 | |
| 1648 /** | |
| 1632 * Set whether this class is defined by a typedef construct to correspond to t he given value. | 1649 * Set whether this class is defined by a typedef construct to correspond to t he given value. |
| 1633 * | 1650 * |
| 1634 * @param isTypedef `true` if the class is defined by a typedef construct | 1651 * @param isTypedef `true` if the class is defined by a typedef construct |
| 1635 */ | 1652 */ |
| 1636 void set typedef(bool isTypedef) { | 1653 void set typedef(bool isTypedef) { |
| 1637 setModifier(Modifier.TYPEDEF, isTypedef); | 1654 setModifier(Modifier.TYPEDEF, isTypedef); |
| 1638 } | 1655 } |
| 1639 | 1656 |
| 1640 /** | 1657 /** |
| 1641 * Set the type parameters defined for this class to the given type parameters . | 1658 * Set the type parameters defined for this class to the given type parameters . |
| (...skipping 7088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8730 * import directive whose URI uses the "dart-ext" scheme. | 8747 * import directive whose URI uses the "dart-ext" scheme. |
| 8731 */ | 8748 */ |
| 8732 static const Modifier HAS_EXT_URI = const Modifier('HAS_EXT_URI', 9); | 8749 static const Modifier HAS_EXT_URI = const Modifier('HAS_EXT_URI', 9); |
| 8733 | 8750 |
| 8734 /** | 8751 /** |
| 8735 * Indicates that a class can validly be used as a mixin. | 8752 * Indicates that a class can validly be used as a mixin. |
| 8736 */ | 8753 */ |
| 8737 static const Modifier MIXIN = const Modifier('MIXIN', 10); | 8754 static const Modifier MIXIN = const Modifier('MIXIN', 10); |
| 8738 | 8755 |
| 8739 /** | 8756 /** |
| 8757 * Indicates that an error has reported explaining why this class is an | |
| 8758 * invalid mixin application. | |
| 8759 */ | |
| 8760 static const Modifier MIXIN_ERRORS_REPORTED = | |
| 8761 const Modifier('MIXIN_ERRORS_REPORTED', 11); | |
| 8762 | |
| 8763 /** | |
| 8740 * Indicates that the value of a parameter or local variable might be mutated within the context. | 8764 * Indicates that the value of a parameter or local variable might be mutated within the context. |
| 8741 */ | 8765 */ |
| 8742 static const Modifier POTENTIALLY_MUTATED_IN_CONTEXT = const Modifier('POTENTI ALLY_MUTATED_IN_CONTEXT', 11); | 8766 static const Modifier POTENTIALLY_MUTATED_IN_CONTEXT = const Modifier('POTENTI ALLY_MUTATED_IN_CONTEXT', 12); |
| 8743 | 8767 |
| 8744 /** | 8768 /** |
| 8745 * Indicates that the value of a parameter or local variable might be mutated within the scope. | 8769 * Indicates that the value of a parameter or local variable might be mutated within the scope. |
| 8746 */ | 8770 */ |
| 8747 static const Modifier POTENTIALLY_MUTATED_IN_SCOPE = const Modifier('POTENTIAL LY_MUTATED_IN_SCOPE', 12); | 8771 static const Modifier POTENTIALLY_MUTATED_IN_SCOPE = const Modifier('POTENTIAL LY_MUTATED_IN_SCOPE', 13); |
| 8748 | 8772 |
| 8749 /** | 8773 /** |
| 8750 * Indicates that a class contains an explicit reference to 'super'. | 8774 * Indicates that a class contains an explicit reference to 'super'. |
| 8751 */ | 8775 */ |
| 8752 static const Modifier REFERENCES_SUPER = const Modifier('REFERENCES_SUPER', 13 ); | 8776 static const Modifier REFERENCES_SUPER = const Modifier('REFERENCES_SUPER', 14 ); |
| 8753 | 8777 |
| 8754 /** | 8778 /** |
| 8755 * Indicates that the pseudo-modifier 'set' was applied to the element. | 8779 * Indicates that the pseudo-modifier 'set' was applied to the element. |
| 8756 */ | 8780 */ |
| 8757 static const Modifier SETTER = const Modifier('SETTER', 14); | 8781 static const Modifier SETTER = const Modifier('SETTER', 15); |
| 8758 | 8782 |
| 8759 /** | 8783 /** |
| 8760 * Indicates that the modifier 'static' was applied to the element. | 8784 * Indicates that the modifier 'static' was applied to the element. |
| 8761 */ | 8785 */ |
| 8762 static const Modifier STATIC = const Modifier('STATIC', 15); | 8786 static const Modifier STATIC = const Modifier('STATIC', 16); |
| 8763 | 8787 |
| 8764 /** | 8788 /** |
| 8765 * Indicates that the element does not appear in the source code but was impli citly created. For | 8789 * Indicates that the element does not appear in the source code but was impli citly created. For |
| 8766 * example, if a class does not define any constructors, an implicit zero-argu ment constructor | 8790 * example, if a class does not define any constructors, an implicit zero-argu ment constructor |
| 8767 * will be created and it will be marked as being synthetic. | 8791 * will be created and it will be marked as being synthetic. |
| 8768 */ | 8792 */ |
| 8769 static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 16); | 8793 static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 17); |
| 8770 | 8794 |
| 8771 /** | 8795 /** |
| 8772 * Indicates that a class was defined using an alias. TODO(brianwilkerson) Thi s should be renamed | 8796 * Indicates that a class was defined using an alias. TODO(brianwilkerson) Thi s should be renamed |
| 8773 * to 'ALIAS'. | 8797 * to 'ALIAS'. |
| 8774 */ | 8798 */ |
| 8775 static const Modifier TYPEDEF = const Modifier('TYPEDEF', 17); | 8799 static const Modifier TYPEDEF = const Modifier('TYPEDEF', 18); |
| 8776 | 8800 |
| 8777 static const List<Modifier> values = const [ | 8801 static const List<Modifier> values = const [ |
| 8778 ABSTRACT, | 8802 ABSTRACT, |
| 8779 ASYNCHRONOUS, | 8803 ASYNCHRONOUS, |
| 8780 CONST, | 8804 CONST, |
| 8781 DEFERRED, | 8805 DEFERRED, |
| 8782 ENUM, | 8806 ENUM, |
| 8783 FACTORY, | 8807 FACTORY, |
| 8784 FINAL, | 8808 FINAL, |
| 8785 GENERATOR, | 8809 GENERATOR, |
| 8786 GETTER, | 8810 GETTER, |
| 8787 HAS_EXT_URI, | 8811 HAS_EXT_URI, |
| 8788 MIXIN, | 8812 MIXIN, |
| 8813 MIXIN_ERRORS_REPORTED, | |
| 8789 POTENTIALLY_MUTATED_IN_CONTEXT, | 8814 POTENTIALLY_MUTATED_IN_CONTEXT, |
| 8790 POTENTIALLY_MUTATED_IN_SCOPE, | 8815 POTENTIALLY_MUTATED_IN_SCOPE, |
| 8791 REFERENCES_SUPER, | 8816 REFERENCES_SUPER, |
| 8792 SETTER, | 8817 SETTER, |
| 8793 STATIC, | 8818 STATIC, |
| 8794 SYNTHETIC, | 8819 SYNTHETIC, |
| 8795 TYPEDEF]; | 8820 TYPEDEF]; |
| 8796 | 8821 |
| 8797 const Modifier(String name, int ordinal) : super(name, ordinal); | 8822 const Modifier(String name, int ordinal) : super(name, ordinal); |
| 8798 } | 8823 } |
| (...skipping 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11739 if (type is UnionType) { | 11764 if (type is UnionType) { |
| 11740 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs); | 11765 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs); |
| 11741 } | 11766 } |
| 11742 // The only subtype relations that pertain to void are therefore: | 11767 // The only subtype relations that pertain to void are therefore: |
| 11743 // void <: void (by reflexivity) | 11768 // void <: void (by reflexivity) |
| 11744 // bottom <: void (as bottom is a subtype of all types). | 11769 // bottom <: void (as bottom is a subtype of all types). |
| 11745 // void <: dynamic (as dynamic is a supertype of all types) | 11770 // void <: dynamic (as dynamic is a supertype of all types) |
| 11746 return identical(type, this) || type.isDynamic; | 11771 return identical(type, this) || type.isDynamic; |
| 11747 } | 11772 } |
| 11748 } | 11773 } |
| OLD | NEW |