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 library elements; | 5 library elements; |
6 | 6 |
7 import 'package:front_end/src/fasta/parser/async_modifier.dart' | 7 import 'package:front_end/src/fasta/parser/async_modifier.dart' |
8 show AsyncModifier; | 8 show AsyncModifier; |
9 | 9 |
10 import '../common.dart'; | 10 import '../common.dart'; |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 } | 771 } |
772 | 772 |
773 static bool isConstructorOfTypedArraySubclass( | 773 static bool isConstructorOfTypedArraySubclass( |
774 Element element, ClosedWorld closedWorld) { | 774 Element element, ClosedWorld closedWorld) { |
775 if (closedWorld.commonElements.typedDataLibrary == null) return false; | 775 if (closedWorld.commonElements.typedDataLibrary == null) return false; |
776 if (!element.isConstructor) return false; | 776 if (!element.isConstructor) return false; |
777 ConstructorElement constructor = element.implementation; | 777 ConstructorElement constructor = element.implementation; |
778 constructor = constructor.effectiveTarget; | 778 constructor = constructor.effectiveTarget; |
779 ClassElement cls = constructor.enclosingClass; | 779 ClassElement cls = constructor.enclosingClass; |
780 return cls.library == closedWorld.commonElements.typedDataLibrary && | 780 return cls.library == closedWorld.commonElements.typedDataLibrary && |
781 closedWorld.backendClasses.isNativeClass(cls) && | 781 closedWorld.nativeData.isNativeClass(cls) && |
782 closedWorld.isSubtypeOf( | 782 closedWorld.isSubtypeOf( |
783 cls, closedWorld.commonElements.typedDataClass) && | 783 cls, closedWorld.commonElements.typedDataClass) && |
784 closedWorld.isSubtypeOf(cls, closedWorld.commonElements.listClass) && | 784 closedWorld.isSubtypeOf(cls, closedWorld.commonElements.listClass) && |
785 constructor.name == ''; | 785 constructor.name == ''; |
786 } | 786 } |
787 | 787 |
788 static bool switchStatementHasContinue( | 788 static bool switchStatementHasContinue( |
789 SwitchStatement node, TreeElements elements) { | 789 SwitchStatement node, TreeElements elements) { |
790 for (SwitchCase switchCase in node.cases) { | 790 for (SwitchCase switchCase in node.cases) { |
791 for (Node labelOrCase in switchCase.labelsAndCases) { | 791 for (Node labelOrCase in switchCase.labelsAndCases) { |
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2033 /// by a field. | 2033 /// by a field. |
2034 bool get isDeclaredByField; | 2034 bool get isDeclaredByField; |
2035 | 2035 |
2036 /// Returns `true` if this member is abstract. | 2036 /// Returns `true` if this member is abstract. |
2037 bool get isAbstract; | 2037 bool get isAbstract; |
2038 | 2038 |
2039 /// If abstract, [implementation] points to the overridden concrete member, | 2039 /// If abstract, [implementation] points to the overridden concrete member, |
2040 /// if any. Otherwise [implementation] points to the member itself. | 2040 /// if any. Otherwise [implementation] points to the member itself. |
2041 Member get implementation; | 2041 Member get implementation; |
2042 } | 2042 } |
OLD | NEW |