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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2918343002: Move LocalDeclarationVisitor for use by contributors that will be moved to analyzer_plugin (Closed)
Patch Set: fix test Created 3 years, 6 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/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 5ea78027cd23070c820754a6b59fccb2946f7574..1df60ec490108660716460dff69268fc17ae3188 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -30,6 +30,7 @@ import 'package:analyzer/src/generated/engine.dart'
AnalysisEngine,
AnalysisOptions,
PerformanceStatistics;
+import 'package:analyzer/src/generated/resolver.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/utilities_general.dart';
import 'package:analyzer/src/lint/registry.dart' as linter;
@@ -41,13 +42,6 @@ import 'package:front_end/src/base/performace_logger.dart';
import 'package:front_end/src/incremental/byte_store.dart';
import 'package:meta/meta.dart';
-class DriverPerformance {
- static final PerformanceTag driver =
- PerformanceStatistics.analyzer.createChild('driver');
-
- static final PerformanceTag cache = driver.createChild('cache');
-}
-
/**
* This class computes [AnalysisResult]s for Dart files.
*
@@ -1668,8 +1662,21 @@ class AnalysisResult implements results.ResolveResult {
this._index);
@override
+ LibraryElement get libraryElement => unit.element.library;
+
+ @override
results.ResultState get state =>
exists ? results.ResultState.VALID : results.ResultState.NOT_A_FILE;
+
+ @override
+ TypeProvider get typeProvider => unit.element.context.typeProvider;
+}
+
+class DriverPerformance {
+ static final PerformanceTag driver =
+ PerformanceStatistics.analyzer.createChild('driver');
+
+ static final PerformanceTag cache = driver.createChild('cache');
}
/**

Powered by Google App Engine
This is Rietveld 408576698