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

Unified Diff: pkg/compiler/lib/src/js/js.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
« no previous file with comments | « pkg/compiler/lib/src/info/send_info.dart ('k') | pkg/compiler/lib/src/js/rewrite_async.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js/js.dart
diff --git a/pkg/compiler/lib/src/js/js.dart b/pkg/compiler/lib/src/js/js.dart
index 7618b960e2d7483a2c7519a487a8d6925e180185..a72da8fb90a220bca4fa172a16bff33441b3a2a8 100644
--- a/pkg/compiler/lib/src/js/js.dart
+++ b/pkg/compiler/lib/src/js/js.dart
@@ -9,6 +9,8 @@ export 'package:js_ast/js_ast.dart';
import '../compiler.dart' show
Compiler;
+import '../diagnostics/diagnostic_listener.dart' show
+ DiagnosticReporter;
import '../diagnostics/spannable.dart' show
NO_LOCATION_SPANNABLE;
import '../dump_info.dart' show
@@ -40,7 +42,7 @@ CodeBuffer prettyPrint(Node node,
new SourceLocationsMapper(outBuffer));
Dart2JSJavaScriptPrintingContext context =
new Dart2JSJavaScriptPrintingContext(
- compiler, monitor, outBuffer, sourceInformationProcessor);
+ compiler.reporter, monitor, outBuffer, sourceInformationProcessor);
Printer printer = new Printer(options, context);
printer.visit(node);
sourceInformationProcessor.process(node);
@@ -48,20 +50,20 @@ CodeBuffer prettyPrint(Node node,
}
class Dart2JSJavaScriptPrintingContext implements JavaScriptPrintingContext {
- final Compiler compiler;
+ final DiagnosticReporter reporter;
final DumpInfoTask monitor;
final CodeBuffer outBuffer;
final CodePositionListener codePositionListener;
Dart2JSJavaScriptPrintingContext(
- this.compiler,
+ this.reporter,
this.monitor,
this.outBuffer,
this.codePositionListener);
@override
void error(String message) {
- compiler.internalError(NO_LOCATION_SPANNABLE, message);
+ reporter.internalError(NO_LOCATION_SPANNABLE, message);
}
@override
« no previous file with comments | « pkg/compiler/lib/src/info/send_info.dart ('k') | pkg/compiler/lib/src/js/rewrite_async.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698