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

Side by Side Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 1327363002: Fixed the last unit test that was failing with the new task model (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.task.dart; 5 library analyzer.src.task.dart;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
(...skipping 2660 matching lines...) Expand 10 before | Expand all | Expand 10 after
2671 // 2671 //
2672 NodeLocator locator = new NodeLocator(variable.nameOffset); 2672 NodeLocator locator = new NodeLocator(variable.nameOffset);
2673 AstNode node = locator.searchWithin(unit); 2673 AstNode node = locator.searchWithin(unit);
2674 VariableDeclaration declaration = node 2674 VariableDeclaration declaration = node
2675 .getAncestor((AstNode ancestor) => ancestor is VariableDeclaration); 2675 .getAncestor((AstNode ancestor) => ancestor is VariableDeclaration);
2676 if (declaration == null || declaration.name != node) { 2676 if (declaration == null || declaration.name != node) {
2677 throw new AnalysisException( 2677 throw new AnalysisException(
2678 "NodeLocator failed to find a variable's declaration"); 2678 "NodeLocator failed to find a variable's declaration");
2679 } 2679 }
2680 Expression initializer = declaration.initializer; 2680 Expression initializer = declaration.initializer;
2681 initializer.accept(new ResolutionEraser()); 2681 ResolutionEraser.erase(initializer, eraseDeclarations: false);
2682 ResolutionContext resolutionContext = 2682 ResolutionContext resolutionContext =
2683 ResolutionContextBuilder.contextFor(initializer, errorListener); 2683 ResolutionContextBuilder.contextFor(initializer, errorListener);
2684 ResolverVisitor visitor = new ResolverVisitor( 2684 ResolverVisitor visitor = new ResolverVisitor(
2685 variable.library, variable.source, typeProvider, errorListener, 2685 variable.library, variable.source, typeProvider, errorListener,
2686 nameScope: resolutionContext.scope); 2686 nameScope: resolutionContext.scope);
2687 if (resolutionContext.enclosingClassDeclaration != null) { 2687 if (resolutionContext.enclosingClassDeclaration != null) {
2688 visitor.prepareToResolveMembersInClass( 2688 visitor.prepareToResolveMembersInClass(
2689 resolutionContext.enclosingClassDeclaration); 2689 resolutionContext.enclosingClassDeclaration);
2690 } 2690 }
2691 visitor.initForIncrementalResolution(); 2691 visitor.initForIncrementalResolution();
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
4096 4096
4097 @override 4097 @override
4098 bool moveNext() { 4098 bool moveNext() {
4099 if (_newSources.isEmpty) { 4099 if (_newSources.isEmpty) {
4100 return false; 4100 return false;
4101 } 4101 }
4102 currentTarget = _newSources.removeLast(); 4102 currentTarget = _newSources.removeLast();
4103 return true; 4103 return true;
4104 } 4104 }
4105 } 4105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698