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

Unified Diff: pkg/compiler/lib/src/dart_backend/placeholder_collector.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_backend/outputter.dart ('k') | pkg/compiler/lib/src/dart_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
diff --git a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart b/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
index b15e76a81dc0480c331c846a0f8a35a9e395090c..42c15f91a26476e11ae5119b849d40f2948890df 100644
--- a/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
+++ b/pkg/compiler/lib/src/dart_backend/placeholder_collector.dart
@@ -170,7 +170,7 @@ class SendVisitor extends Visitor {
}
class PlaceholderCollector extends Visitor {
- final DiagnosticListener listener;
+ final DiagnosticReporter reporter;
final MirrorRenamer mirrorRenamer;
final FunctionElement mainFunction;
final Set<String> fixedMemberNames; // member names which cannot be renamed.
@@ -196,7 +196,7 @@ class PlaceholderCollector extends Visitor {
get currentFunctionScope => functionScopes.putIfAbsent(
topmostEnclosingFunction, () => new FunctionScope());
- PlaceholderCollector(this.listener, this.mirrorRenamer,
+ PlaceholderCollector(this.reporter, this.mirrorRenamer,
this.fixedMemberNames, this.elementAsts,
this.mainFunction);
@@ -258,7 +258,7 @@ class PlaceholderCollector extends Visitor {
currentLocalPlaceholders = new Map<String, LocalPlaceholder>();
if (!(element is ConstructorElement && element.isRedirectingFactory)) {
// Do not visit the body of redirecting factories.
- listener.withCurrentElement(element, () {
+ reporter.withCurrentElement(element, () {
elementNode.accept(this);
});
}
@@ -475,7 +475,7 @@ class PlaceholderCollector extends Visitor {
}
void internalError(String reason, {Node node}) {
- listener.internalError(node, reason);
+ reporter.internalError(node, reason);
}
visit(Node node) => (node == null) ? null : node.accept(this);
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/outputter.dart ('k') | pkg/compiler/lib/src/dart_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698