analyzer: Save one SimpleIdentifierResolver

Change-Id: I5c7076c98c92f9eef876634f9a389f92ffa42a15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This commit is contained in:
Sam Rawlins 2021-08-25 15:54:12 +00:00 committed by commit-bot@chromium.org
parent 965af148f3
commit 1f06c7462b

View file

@ -295,6 +295,9 @@ class ResolverVisitor extends ResolverBase with ErrorDetectionHelpers {
_instanceCreationExpressionResolver =
InstanceCreationExpressionResolver(this);
late final SimpleIdentifierResolver _simpleIdentifierResolver =
SimpleIdentifierResolver(this, flowAnalysis);
/// Initialize a newly created visitor to resolve the nodes in an AST node.
///
/// The [definingLibrary] is the element for the library containing the node
@ -1857,7 +1860,7 @@ class ResolverVisitor extends ResolverBase with ErrorDetectionHelpers {
@override
void visitSimpleIdentifier(covariant SimpleIdentifierImpl node) {
SimpleIdentifierResolver(this, flowAnalysis).resolve(node);
_simpleIdentifierResolver.resolve(node);
}
@override