| 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 '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/resolution.dart' show Resolution; | 8 import '../common/resolution.dart' show Resolution; |
| 9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
| 10 import '../constants/constructors.dart'; | 10 import '../constants/constructors.dart'; |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 } | 780 } |
| 781 | 781 |
| 782 static bool isConstructorOfTypedArraySubclass( | 782 static bool isConstructorOfTypedArraySubclass( |
| 783 Element element, ClosedWorld closedWorld) { | 783 Element element, ClosedWorld closedWorld) { |
| 784 if (closedWorld.commonElements.typedDataLibrary == null) return false; | 784 if (closedWorld.commonElements.typedDataLibrary == null) return false; |
| 785 if (!element.isConstructor) return false; | 785 if (!element.isConstructor) return false; |
| 786 ConstructorElement constructor = element.implementation; | 786 ConstructorElement constructor = element.implementation; |
| 787 constructor = constructor.effectiveTarget; | 787 constructor = constructor.effectiveTarget; |
| 788 ClassElement cls = constructor.enclosingClass; | 788 ClassElement cls = constructor.enclosingClass; |
| 789 return cls.library == closedWorld.commonElements.typedDataLibrary && | 789 return cls.library == closedWorld.commonElements.typedDataLibrary && |
| 790 closedWorld.backendClasses.isNativeClass(cls) && | 790 closedWorld.backendClasses.isNative(cls) && |
| 791 closedWorld.isSubtypeOf( | 791 closedWorld.isSubtypeOf( |
| 792 cls, closedWorld.commonElements.typedDataClass) && | 792 cls, closedWorld.commonElements.typedDataClass) && |
| 793 closedWorld.isSubtypeOf(cls, closedWorld.commonElements.listClass) && | 793 closedWorld.isSubtypeOf(cls, closedWorld.commonElements.listClass) && |
| 794 constructor.name == ''; | 794 constructor.name == ''; |
| 795 } | 795 } |
| 796 | 796 |
| 797 static bool switchStatementHasContinue( | 797 static bool switchStatementHasContinue( |
| 798 SwitchStatement node, TreeElements elements) { | 798 SwitchStatement node, TreeElements elements) { |
| 799 for (SwitchCase switchCase in node.cases) { | 799 for (SwitchCase switchCase in node.cases) { |
| 800 for (Node labelOrCase in switchCase.labelsAndCases) { | 800 for (Node labelOrCase in switchCase.labelsAndCases) { |
| (...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1917 /// by a field. | 1917 /// by a field. |
| 1918 bool get isDeclaredByField; | 1918 bool get isDeclaredByField; |
| 1919 | 1919 |
| 1920 /// Returns `true` if this member is abstract. | 1920 /// Returns `true` if this member is abstract. |
| 1921 bool get isAbstract; | 1921 bool get isAbstract; |
| 1922 | 1922 |
| 1923 /// If abstract, [implementation] points to the overridden concrete member, | 1923 /// If abstract, [implementation] points to the overridden concrete member, |
| 1924 /// if any. Otherwise [implementation] points to the member itself. | 1924 /// if any. Otherwise [implementation] points to the member itself. |
| 1925 Member get implementation; | 1925 Member get implementation; |
| 1926 } | 1926 } |
| OLD | NEW |