| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 () => resolver.computeFunctionType(element, signature)); | 834 () => resolver.computeFunctionType(element, signature)); |
| 835 } | 835 } |
| 836 | 836 |
| 837 reportWarning(Node node, var message) { | 837 reportWarning(Node node, var message) { |
| 838 if (message is TypeWarning) { | 838 if (message is TypeWarning) { |
| 839 // TODO(ahe): Don't supress these warning when the type checker | 839 // TODO(ahe): Don't supress these warning when the type checker |
| 840 // is more complete. | 840 // is more complete. |
| 841 if (identical(message.message.kind, MessageKind.NOT_ASSIGNABLE)) return; | 841 if (identical(message.message.kind, MessageKind.NOT_ASSIGNABLE)) return; |
| 842 if (identical(message.message.kind, MessageKind.MISSING_RETURN)) return; | 842 if (identical(message.message.kind, MessageKind.MISSING_RETURN)) return; |
| 843 if (identical(message.message.kind, MessageKind.MAYBE_MISSING_RETURN)) ret
urn; | 843 if (identical(message.message.kind, MessageKind.MAYBE_MISSING_RETURN)) ret
urn; |
| 844 if (identical(message.message.kind, MessageKind.ADDITIONAL_ARGUMENT)) retu
rn; | |
| 845 if (identical(message.message.kind, MessageKind.METHOD_NOT_FOUND)) return; | 844 if (identical(message.message.kind, MessageKind.METHOD_NOT_FOUND)) return; |
| 846 } | 845 } |
| 847 SourceSpan span = spanFromNode(node); | 846 SourceSpan span = spanFromNode(node); |
| 848 | 847 |
| 849 reportDiagnostic(span, 'Warning: $message', api.Diagnostic.WARNING); | 848 reportDiagnostic(span, 'Warning: $message', api.Diagnostic.WARNING); |
| 850 } | 849 } |
| 851 | 850 |
| 852 // TODO(ahe): Remove this method. | 851 // TODO(ahe): Remove this method. |
| 853 reportError(Node node, var message) { | 852 reportError(Node node, var message) { |
| 854 SourceSpan span = spanFromNode(node); | 853 SourceSpan span = spanFromNode(node); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1120 | 1119 |
| 1121 void close() {} | 1120 void close() {} |
| 1122 | 1121 |
| 1123 toString() => name; | 1122 toString() => name; |
| 1124 | 1123 |
| 1125 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1124 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1126 static NullSink outputProvider(String name, String extension) { | 1125 static NullSink outputProvider(String name, String extension) { |
| 1127 return new NullSink('$name.$extension'); | 1126 return new NullSink('$name.$extension'); |
| 1128 } | 1127 } |
| 1129 } | 1128 } |
| OLD | NEW |