| 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 | 8 import '../common/resolution.dart' show |
| 9 Resolution; | 9 Resolution; |
| 10 import '../compiler.dart' show | 10 import '../compiler.dart' show |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 static bool isConstructorOfTypedArraySubclass(Element element, | 734 static bool isConstructorOfTypedArraySubclass(Element element, |
| 735 Compiler compiler) { | 735 Compiler compiler) { |
| 736 if (compiler.typedDataLibrary == null) return false; | 736 if (compiler.typedDataLibrary == null) return false; |
| 737 if (!element.isConstructor) return false; | 737 if (!element.isConstructor) return false; |
| 738 ConstructorElement constructor = element.implementation; | 738 ConstructorElement constructor = element.implementation; |
| 739 constructor = constructor.effectiveTarget; | 739 constructor = constructor.effectiveTarget; |
| 740 ClassElement cls = constructor.enclosingClass; | 740 ClassElement cls = constructor.enclosingClass; |
| 741 return cls.library == compiler.typedDataLibrary | 741 return cls.library == compiler.typedDataLibrary |
| 742 && compiler.backend.isNative(cls) | 742 && compiler.backend.isNative(cls) |
| 743 && compiler.world.isSubtypeOf(cls, compiler.typedDataClass) | 743 && compiler.world.isSubtypeOf(cls, compiler.typedDataClass) |
| 744 && compiler.world.isSubtypeOf(cls, compiler.listClass) | 744 && compiler.world.isSubtypeOf(cls, compiler.coreClasses.listClass) |
| 745 && constructor.name == ''; | 745 && constructor.name == ''; |
| 746 } | 746 } |
| 747 | 747 |
| 748 static bool switchStatementHasContinue(SwitchStatement node, | 748 static bool switchStatementHasContinue(SwitchStatement node, |
| 749 TreeElements elements) { | 749 TreeElements elements) { |
| 750 for (SwitchCase switchCase in node.cases) { | 750 for (SwitchCase switchCase in node.cases) { |
| 751 for (Node labelOrCase in switchCase.labelsAndCases) { | 751 for (Node labelOrCase in switchCase.labelsAndCases) { |
| 752 Node label = labelOrCase.asLabel(); | 752 Node label = labelOrCase.asLabel(); |
| 753 if (label != null) { | 753 if (label != null) { |
| 754 LabelDefinition labelElement = elements.getLabelDefinition(label); | 754 LabelDefinition labelElement = elements.getLabelDefinition(label); |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 bool get isDeclaredByField; | 1700 bool get isDeclaredByField; |
| 1701 | 1701 |
| 1702 /// Returns `true` if this member is abstract. | 1702 /// Returns `true` if this member is abstract. |
| 1703 bool get isAbstract; | 1703 bool get isAbstract; |
| 1704 | 1704 |
| 1705 /// If abstract, [implementation] points to the overridden concrete member, | 1705 /// If abstract, [implementation] points to the overridden concrete member, |
| 1706 /// if any. Otherwise [implementation] points to the member itself. | 1706 /// if any. Otherwise [implementation] points to the member itself. |
| 1707 Member get implementation; | 1707 Member get implementation; |
| 1708 } | 1708 } |
| 1709 | 1709 |
| OLD | NEW |