Give LibraryScope to AstRewriteVisitor.
We don't want to recreate these scopes. R=brianwilkerson@google.com Change-Id: I006c59af558e5f39c20e36811c17da05f5641818 Reviewed-on: https://dart-review.googlesource.com/77264 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
e7e8786670
commit
1be151dcce
@@ -576,8 +576,10 @@ class LibraryAnalyzer {
|
||||
|
||||
new DeclarationResolver().resolve(unit, unitElement);
|
||||
|
||||
LibraryScope libraryScope = new LibraryScope(_libraryElement);
|
||||
unit.accept(new AstRewriteVisitor(_context.typeSystem, _libraryElement,
|
||||
source, _typeProvider, errorListener));
|
||||
source, _typeProvider, errorListener,
|
||||
nameScope: libraryScope));
|
||||
|
||||
// TODO(scheglov) remove EnumMemberBuilder class
|
||||
|
||||
@@ -588,7 +590,6 @@ class LibraryAnalyzer {
|
||||
unit.accept(new TypeResolverVisitor(
|
||||
_libraryElement, source, _typeProvider, errorListener));
|
||||
|
||||
LibraryScope libraryScope = new LibraryScope(_libraryElement);
|
||||
unit.accept(new VariableResolverVisitor(
|
||||
_libraryElement, source, _typeProvider, errorListener,
|
||||
nameScope: libraryScope));
|
||||
|
||||
Reference in New Issue
Block a user