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

Unified Diff: pkg/compiler/lib/src/world.dart

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 502ea8e9073d6de6b26250f58e5654a9e52679a0..900b73ea9c0c63f8852ea8369493bcc28c30af84 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -13,6 +13,8 @@ import 'common/registry.dart' show
import 'compiler.dart' show
Compiler;
import 'dart_types.dart';
+import 'diagnostics/diagnostic_listener.dart' show
+ DiagnosticReporter;
import 'diagnostics/invariant.dart' show
invariant;
import 'elements/elements.dart' show
@@ -417,6 +419,8 @@ class World implements ClassWorld {
this.compiler = compiler,
alreadyPopulated = compiler.cacheStrategy.newSet();
+ DiagnosticReporter get reporter => compiler.reporter;
+
/// Called to add [cls] to the set of known classes.
///
/// This ensures that class hierarchy queries can be performed on [cls] and
@@ -500,7 +504,7 @@ class World implements ClassWorld {
}
assert(cls.isDeclaration);
if (!cls.isResolved) {
- compiler.internalError(cls, 'Class "${cls.name}" is not resolved.');
+ reporter.internalError(cls, 'Class "${cls.name}" is not resolved.');
}
updateClassHierarchyNodeForClass(cls, directlyInstantiated: true);

Powered by Google App Engine
This is Rietveld 408576698