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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 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: pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
index 45ccabec333803cb213a711624fab6e834fef86b..ea0537a16e735b457d3ce2d54f5d5c450eacb965 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -27,6 +27,9 @@ import '../js_emitter.dart' show
import '../js_emitter.dart' as emitterTask show
Emitter;
+import '../../diagnostics/diagnostic_listener.dart' show
+ DiagnosticReporter;
+
import '../../diagnostics/spannable.dart' show
NO_LOCATION_SPANNABLE;
@@ -44,6 +47,8 @@ class Emitter implements emitterTask.Emitter {
_emitter = new ModelEmitter(
compiler, namer, nativeEmitter, shouldGenerateSourceMap);
+ DiagnosticReporter get reporter => _compiler.reporter;
+
@override
String get patchVersion => "startup";
@@ -184,7 +189,7 @@ class Emitter implements emitterTask.Emitter {
return js.js.expressionTemplateFor("$functionAccess(#)");
default:
- _compiler.internalError(NO_LOCATION_SPANNABLE,
+ reporter.internalError(NO_LOCATION_SPANNABLE,
"Unhandled Builtin: $builtin");
return null;
}

Powered by Google App Engine
This is Rietveld 408576698