| 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 class TypeCheckerTask extends CompilerTask { | 5 class TypeCheckerTask extends CompilerTask { |
| 6 TypeCheckerTask(Compiler compiler) : super(compiler); | 6 TypeCheckerTask(Compiler compiler) : super(compiler); |
| 7 String get name() => "Type checker"; | 7 String get name() => "Type checker"; |
| 8 | 8 |
| 9 static final bool LOG_FAILURES = false; | 9 static final bool LOG_FAILURES = false; |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 }); | 23 }); |
| 24 } | 24 } |
| 25 } | 25 } |
| 26 | 26 |
| 27 interface Type { | 27 interface Type { |
| 28 SourceString get name(); | 28 SourceString get name(); |
| 29 Element get element(); | 29 Element get element(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 class TypeVariableType implements Type { | 32 class TypeVariableType implements Type { |
| 33 final SourceString name; | 33 final TypeVariableElement element; |
| 34 TypeVariableElement element; | 34 |
| 35 TypeVariableType(this.name, [this.element]); | 35 TypeVariableType(this.element); |
| 36 |
| 37 SourceString get name() => element.name; |
| 36 | 38 |
| 37 toString() => name.slowToString(); | 39 toString() => name.slowToString(); |
| 38 } | 40 } |
| 39 | 41 |
| 40 /** | 42 /** |
| 41 * A statement type tracks whether a statement returns or may return. | 43 * A statement type tracks whether a statement returns or may return. |
| 42 */ | 44 */ |
| 43 class StatementType implements Type { | 45 class StatementType implements Type { |
| 44 final String stringName; | 46 final String stringName; |
| 45 Element get element() => null; | 47 Element get element() => null; |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 } | 774 } |
| 773 | 775 |
| 774 visitCatchBlock(CatchBlock node) { | 776 visitCatchBlock(CatchBlock node) { |
| 775 return unhandledStatement(); | 777 return unhandledStatement(); |
| 776 } | 778 } |
| 777 | 779 |
| 778 visitTypedef(Typedef node) { | 780 visitTypedef(Typedef node) { |
| 779 return unhandledStatement(); | 781 return unhandledStatement(); |
| 780 } | 782 } |
| 781 } | 783 } |
| OLD | NEW |