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

Unified Diff: pkg/compiler/lib/src/deferred_load.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/dart_types.dart ('k') | pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/deferred_load.dart
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index deb2fc67c0d4e14ddc8f797a42a78baeea8c56fa..baab943c74ba08c8372ffe1c6768fdb57d031112 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -203,7 +203,7 @@ class DeferredLoadTask extends CompilerTask {
String name =
_importDeferName[new _DeclaredDeferredImport(prefix.deferredImport)];
if (name == null) {
- compiler.internalError(node, "No deferred name for $prefix.");
+ reporter.internalError(node, "No deferred name for $prefix.");
}
return name;
}
@@ -716,7 +716,7 @@ class DeferredLoadTask extends CompilerTask {
Map<String, ImportElement> prefixDeferredImport =
new Map<String, ImportElement>();
for (LibraryElement library in compiler.libraryLoader.libraries) {
- compiler.withCurrentElement(library, () {
+ reporter.withCurrentElement(library, () {
prefixDeferredImport.clear();
usedPrefixes.clear();
// TODO(sigurdm): Make helper getLibraryImportTags when tags is a List
@@ -731,7 +731,7 @@ class DeferredLoadTask extends CompilerTask {
compiler.constants.getConstantValue(metadata.constant);
Element element = value.getType(compiler.coreTypes).element;
if (element == deferredLibraryClass) {
- compiler.reportErrorMessage(
+ reporter.reportErrorMessage(
import, MessageKind.DEFERRED_OLD_SYNTAX);
}
}
@@ -748,7 +748,7 @@ class DeferredLoadTask extends CompilerTask {
_allDeferredImports[key] = importedLibrary;
if (prefix == null) {
- compiler.reportErrorMessage(
+ reporter.reportErrorMessage(
import,
MessageKind.DEFERRED_LIBRARY_WITHOUT_PREFIX);
} else {
@@ -765,7 +765,7 @@ class DeferredLoadTask extends CompilerTask {
ImportElement failingImport = (previousDeferredImport != null)
? previousDeferredImport
: import;
- compiler.reportErrorMessage(
+ reporter.reportErrorMessage(
failingImport.prefix,
MessageKind.DEFERRED_LIBRARY_DUPLICATE_PREFIX);
}
« no previous file with comments | « pkg/compiler/lib/src/dart_types.dart ('k') | pkg/compiler/lib/src/diagnostics/diagnostic_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698