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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_inferrer.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/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/info/send_info.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index 1bcb5d59d18fb3cfc98893d06948d7678a756dc9..8828f9237bb575f89c2af6971148e8b13d581bae 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -21,6 +21,8 @@ import '../dart_types.dart' show
FunctionType,
InterfaceType,
TypeKind;
+import '../diagnostics/diagnostic_listener.dart' show
+ DiagnosticReporter;
import '../diagnostics/invariant.dart' show
invariant;
import '../diagnostics/spannable.dart' show
@@ -588,6 +590,7 @@ class TypeGraphInferrerEngine
JavaScriptBackend get backend => compiler.backend;
Annotations get annotations => backend.annotations;
+ DiagnosticReporter get reporter => compiler.reporter;
/**
* A set of selector names that [List] implements, that we know return
@@ -669,14 +672,14 @@ class TypeGraphInferrerEngine
}
sortResolvedElements().forEach((Element element) {
if (compiler.shouldPrintProgress) {
- compiler.log('Added $addedInGraph elements in inferencing graph.');
+ reporter.log('Added $addedInGraph elements in inferencing graph.');
compiler.progress.reset();
}
// This also forces the creation of the [ElementTypeInformation] to ensure
// it is in the graph.
types.withMember(element, () => analyze(element, null));
});
- compiler.log('Added $addedInGraph elements in inferencing graph.');
+ reporter.log('Added $addedInGraph elements in inferencing graph.');
buildWorkQueue();
refine();
@@ -820,7 +823,7 @@ class TypeGraphInferrerEngine
});
}
- compiler.log('Inferred $overallRefineCount types.');
+ reporter.log('Inferred $overallRefineCount types.');
processLoopInformation();
}
@@ -833,7 +836,7 @@ class TypeGraphInferrerEngine
SimpleTypeInferrerVisitor visitor =
new SimpleTypeInferrerVisitor(element, compiler, this);
TypeInformation type;
- compiler.withCurrentElement(element, () {
+ reporter.withCurrentElement(element, () {
type = visitor.run();
});
addedInGraph++;
@@ -913,7 +916,7 @@ class TypeGraphInferrerEngine
void refine() {
while (!workQueue.isEmpty) {
if (compiler.shouldPrintProgress) {
- compiler.log('Inferred $overallRefineCount types.');
+ reporter.log('Inferred $overallRefineCount types.');
compiler.progress.reset();
}
TypeInformation info = workQueue.remove();
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/info/send_info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698