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 closureToClassMapper; | 5 library closureToClassMapper; |
6 | 6 |
7 import 'common/names.dart' show | 7 import 'common/names.dart' show |
8 Identifiers; | 8 Identifiers; |
9 import 'common/tasks.dart' show | 9 import 'common/tasks.dart' show |
10 CompilerTask; | 10 CompilerTask; |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 } else if (node.isTypeTest || node.isTypeCast) { | 779 } else if (node.isTypeTest || node.isTypeCast) { |
780 TypeAnnotation annotation = node.typeAnnotationFromIsCheckOrCast; | 780 TypeAnnotation annotation = node.typeAnnotationFromIsCheckOrCast; |
781 DartType type = elements.getType(annotation); | 781 DartType type = elements.getType(annotation); |
782 analyzeType(type); | 782 analyzeType(type); |
783 } else if (node.isTypeTest) { | 783 } else if (node.isTypeTest) { |
784 DartType type = elements.getType(node.typeAnnotationFromIsCheckOrCast); | 784 DartType type = elements.getType(node.typeAnnotationFromIsCheckOrCast); |
785 analyzeType(type); | 785 analyzeType(type); |
786 } else if (node.isTypeCast) { | 786 } else if (node.isTypeCast) { |
787 DartType type = elements.getType(node.arguments.head); | 787 DartType type = elements.getType(node.arguments.head); |
788 analyzeType(type); | 788 analyzeType(type); |
789 } else if (elements.isAssert(node) && !compiler.enableUserAssertions) { | |
790 return; | |
791 } | 789 } |
792 node.visitChildren(this); | 790 node.visitChildren(this); |
793 } | 791 } |
794 | 792 |
795 visitSendSet(SendSet node) { | 793 visitSendSet(SendSet node) { |
796 Element element = elements[node]; | 794 Element element = elements[node]; |
797 if (Elements.isLocal(element)) { | 795 if (Elements.isLocal(element)) { |
798 mutatedVariables.add(element); | 796 mutatedVariables.add(element); |
799 if (compiler.enableTypeAssertions) { | 797 if (compiler.enableTypeAssertions) { |
800 TypedElement typedElement = element; | 798 TypedElement typedElement = element; |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 | 1120 |
1123 String get name => typeVariable.name; | 1121 String get name => typeVariable.name; |
1124 | 1122 |
1125 int get hashCode => typeVariable.hashCode; | 1123 int get hashCode => typeVariable.hashCode; |
1126 | 1124 |
1127 bool operator ==(other) { | 1125 bool operator ==(other) { |
1128 if (other is! TypeVariableLocal) return false; | 1126 if (other is! TypeVariableLocal) return false; |
1129 return typeVariable == other.typeVariable; | 1127 return typeVariable == other.typeVariable; |
1130 } | 1128 } |
1131 } | 1129 } |
OLD | NEW |