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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/model_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/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index 8c9f24783129663857d57171a2125aa9e7a07ec6..ec8ac00c1c86105465ac23a8217663c3ea29bb89 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -31,6 +31,9 @@ import '../../js_backend/js_backend.dart' show
Namer,
ConstantEmitter;
+import '../../diagnostics/diagnostic_listener.dart' show
+ DiagnosticReporter;
+
import '../../diagnostics/spannable.dart' show
NO_LOCATION_SPANNABLE;
@@ -100,6 +103,8 @@ class ModelEmitter {
constantListGenerator);
}
+ DiagnosticReporter get reporter => compiler.reporter;
+
js.Expression constantListGenerator(js.Expression array) {
// TODO(floitsch): remove hard-coded name.
return js.js('makeConstList(#)', [array]);
@@ -211,7 +216,7 @@ class ModelEmitter {
if (backend.requiresPreamble &&
!backend.htmlLibraryIsLoaded) {
- compiler.reportHintMessage(
+ reporter.reportHintMessage(
NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE);
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698