Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1044)

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 14031011: Print the location of duplicated elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/diagnostic_listener.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 } 1087 }
1088 1088
1089 // TODO(ahe): Rename to reportWarning when that method has been removed. 1089 // TODO(ahe): Rename to reportWarning when that method has been removed.
1090 void reportWarningCode(Spannable node, MessageKind errorCode, 1090 void reportWarningCode(Spannable node, MessageKind errorCode,
1091 [Map arguments = const {}]) { 1091 [Map arguments = const {}]) {
1092 reportMessage(spanFromSpannable(node), 1092 reportMessage(spanFromSpannable(node),
1093 errorCode.error(arguments), 1093 errorCode.error(arguments),
1094 api.Diagnostic.WARNING); 1094 api.Diagnostic.WARNING);
1095 } 1095 }
1096 1096
1097 void reportInfo(Spannable node, MessageKind errorCode,
1098 [Map arguments = const {}]) {
1099 reportMessage(spanFromSpannable(node),
1100 errorCode.error(arguments),
1101 api.Diagnostic.INFO);
1102 }
1103
1097 void reportMessage(SourceSpan span, Diagnostic message, api.Diagnostic kind) { 1104 void reportMessage(SourceSpan span, Diagnostic message, api.Diagnostic kind) {
1098 // TODO(ahe): The names Diagnostic and api.Diagnostic are in 1105 // TODO(ahe): The names Diagnostic and api.Diagnostic are in
1099 // conflict. Fix it. 1106 // conflict. Fix it.
1100 reportDiagnostic(span, "$message", kind); 1107 reportDiagnostic(span, "$message", kind);
1101 } 1108 }
1102 1109
1103 /// Returns true if a diagnostic was emitted. 1110 /// Returns true if a diagnostic was emitted.
1104 bool onDeprecatedFeature(Spannable span, String feature) { 1111 bool onDeprecatedFeature(Spannable span, String feature) {
1105 if (currentElement == null) 1112 if (currentElement == null)
1106 throw new SpannableAssertionFailure(span, feature); 1113 throw new SpannableAssertionFailure(span, feature);
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 1370
1364 void close() {} 1371 void close() {}
1365 1372
1366 toString() => name; 1373 toString() => name;
1367 1374
1368 /// Convenience method for getting an [api.CompilerOutputProvider]. 1375 /// Convenience method for getting an [api.CompilerOutputProvider].
1369 static NullSink outputProvider(String name, String extension) { 1376 static NullSink outputProvider(String name, String extension) {
1370 return new NullSink('$name.$extension'); 1377 return new NullSink('$name.$extension');
1371 } 1378 }
1372 } 1379 }
OLDNEW
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/diagnostic_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698