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

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: 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/types/constants.dart ('k') | tests/compiler/dart2js/analyze_unused_dart2js_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/world.dart
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index 7d63fb6268c835a52755633028bc1c76ae146742..c7d8c0799969aab6429ca45c72f829ea65f32c5f 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
@@ -434,6 +436,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
@@ -517,7 +521,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);
« no previous file with comments | « pkg/compiler/lib/src/types/constants.dart ('k') | tests/compiler/dart2js/analyze_unused_dart2js_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698