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

Unified Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 1917893003: Optimize the task to re-resolve instance fields (issue 26306) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add comment Created 4 years, 8 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/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 35f78940434ccebee9681b48e79b82972812fb4b..283bca3c0b1f6f72739b7d6e3e5e9efc04206229 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -4517,20 +4517,12 @@ class ResolveInstanceFieldsInUnitTask extends SourceBasedAnalysisTask {
//
// Resolve references.
//
- // TODO(leafp): This code only needs to re-resolve the right hand sides of
- // instance fields. We could do incremental resolution on each field
- // only using the incremental resolver. However, this caused a massive
- // performance degredation on the large_class_declaration_test.dart test.
- // I would hypothesize that incremental resolution of field is linear in
- // the size of the enclosing class, and hence incrementally resolving each
- // field was quadratic. We may wish to revisit this if we can resolve
- // this performance issue.
- PartialResolverVisitor visitor = new PartialResolverVisitor(
+ InstanceFieldResolverVisitor visitor = new InstanceFieldResolverVisitor(
libraryElement,
unitElement.source,
typeProvider,
AnalysisErrorListener.NULL_LISTENER);
- unit.accept(visitor);
+ visitor.resolveCompilationUnit(unit);
}
//
// Record outputs.

Powered by Google App Engine
This is Rietveld 408576698