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

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

Issue 2000323006: Make CompilerTask independent of compiler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/mirrors_used.dart
diff --git a/pkg/compiler/lib/src/mirrors_used.dart b/pkg/compiler/lib/src/mirrors_used.dart
index a13469e6b3ee861d8fb013b35170c33786c117b4..c909c8a1f4e3330e0dfd7b1cf86a738a132e84f0 100644
--- a/pkg/compiler/lib/src/mirrors_used.dart
+++ b/pkg/compiler/lib/src/mirrors_used.dart
@@ -80,8 +80,11 @@ import 'tree/tree.dart' show NamedArgument, NewExpression, Node;
class MirrorUsageAnalyzerTask extends CompilerTask {
Set<LibraryElement> librariesWithUsage;
MirrorUsageAnalyzer analyzer;
+ final Compiler compiler;
- MirrorUsageAnalyzerTask(Compiler compiler) : super(compiler) {
+ MirrorUsageAnalyzerTask(Compiler compiler)
+ : compiler = compiler,
+ super(compiler.measurer) {
analyzer = new MirrorUsageAnalyzer(compiler, this);
}
@@ -150,9 +153,8 @@ class MirrorUsageAnalyzer {
final Map<ConstantValue, List<Element>> cachedElements;
MirrorUsage mergedMirrorUsage;
- MirrorUsageAnalyzer(Compiler compiler, this.task)
- : compiler = compiler,
- librariesWithUsage = new Set<LibraryElement>(),
+ MirrorUsageAnalyzer(this.compiler, this.task)
+ : librariesWithUsage = new Set<LibraryElement>(),
cachedStrings = new Map<ConstantValue, List<String>>(),
cachedElements = new Map<ConstantValue, List<Element>>();

Powered by Google App Engine
This is Rietveld 408576698