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

Unified Diff: sdk/lib/_internal/compiler/implementation/apiimpl.dart

Issue 169763003: Update dart2js diagnostics to prepare for filtering. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove optional Uri. Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/apiimpl.dart
diff --git a/sdk/lib/_internal/compiler/implementation/apiimpl.dart b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
index 0afeed47dbd422ee25041f9a8aed020b953c7476..6ad363a5072ce7b0172a7a926e6943a484492abd 100644
--- a/sdk/lib/_internal/compiler/implementation/apiimpl.dart
+++ b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
@@ -14,6 +14,7 @@ import 'ssa/tracer.dart' as ssa;
import '../../libraries.dart';
import 'source_file.dart';
+
class Compiler extends leg.Compiler {
api.CompilerInputProvider provider;
api.DiagnosticHandler handler;
@@ -284,8 +285,10 @@ class Compiler extends leg.Compiler {
});
}
- void reportDiagnostic(leg.SourceSpan span, String message,
+ void reportDiagnostic(leg.Spannable node,
+ leg.Diagnostic message,
floitsch 2014/02/19 14:57:40 We really have to change one of the names...
api.Diagnostic kind) {
+ leg.SourceSpan span = spanFromSpannable(node);
if (identical(kind, api.Diagnostic.ERROR)
|| identical(kind, api.Diagnostic.CRASH)) {
compilationFailed = true;
@@ -293,10 +296,10 @@ class Compiler extends leg.Compiler {
// [:span.uri:] might be [:null:] in case of a [Script] with no [uri]. For
// instance in the [Types] constructor in typechecker.dart.
if (span == null || span.uri == null) {
- callUserHandler(null, null, null, message, kind);
+ callUserHandler(null, null, null, '$message', kind);
} else {
callUserHandler(
- translateUri(span.uri, null), span.begin, span.end, message, kind);
+ translateUri(span.uri, null), span.begin, span.end, '$message', kind);
}
}

Powered by Google App Engine
This is Rietveld 408576698