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

Side by Side Diff: pkg/analyzer/test/src/task/incremental_element_builder_test.dart

Issue 2231473002: Revert 6ad38498c8673f1fbe3e12c49b1cf590305676dd (PARSED_UNIT). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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.test.src.task.incremental_element_builder_test; 5 library analyzer.test.src.task.incremental_element_builder_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/dart/element/visitor.dart'; 9 import 'package:analyzer/dart/element/visitor.dart';
10 import 'package:analyzer/src/dart/ast/utilities.dart'; 10 import 'package:analyzer/src/dart/ast/utilities.dart';
(...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 context.setContents(source, newCode); 1996 context.setContents(source, newCode);
1997 newUnit = context.parseCompilationUnit(source); 1997 newUnit = context.parseCompilationUnit(source);
1998 IncrementalCompilationUnitElementBuilder builder = 1998 IncrementalCompilationUnitElementBuilder builder =
1999 new IncrementalCompilationUnitElementBuilder(oldUnit, newUnit); 1999 new IncrementalCompilationUnitElementBuilder(oldUnit, newUnit);
2000 builder.build(); 2000 builder.build();
2001 unitDelta = builder.unitDelta; 2001 unitDelta = builder.unitDelta;
2002 expect(newUnit.element, unitElement); 2002 expect(newUnit.element, unitElement);
2003 // Flush all tokens, ASTs and elements. 2003 // Flush all tokens, ASTs and elements.
2004 context.analysisCache.flush((target, result) { 2004 context.analysisCache.flush((target, result) {
2005 return result == TOKEN_STREAM || 2005 return result == TOKEN_STREAM ||
2006 result == PARSED_UNIT1 ||
2007 result == PARSED_UNIT || 2006 result == PARSED_UNIT ||
2008 RESOLVED_UNIT_RESULTS.contains(result) || 2007 RESOLVED_UNIT_RESULTS.contains(result) ||
2009 LIBRARY_ELEMENT_RESULTS.contains(result); 2008 LIBRARY_ELEMENT_RESULTS.contains(result);
2010 }); 2009 });
2011 // Compute a new AST with built elements. 2010 // Compute a new AST with built elements.
2012 CompilationUnit newUnitFull = context.computeResult( 2011 CompilationUnit newUnitFull = context.computeResult(
2013 new LibrarySpecificUnit(source, source), RESOLVED_UNIT1); 2012 new LibrarySpecificUnit(source, source), RESOLVED_UNIT1);
2014 expect(newUnitFull, isNot(same(newUnit))); 2013 expect(newUnitFull, isNot(same(newUnit)));
2015 new _BuiltElementsValidator().isEqualNodes(newUnitFull, newUnit); 2014 new _BuiltElementsValidator().isEqualNodes(newUnitFull, newUnit);
2016 } finally { 2015 } finally {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2220 unitMember is ClassDeclaration && unitMember.name.name == name); 2219 unitMember is ClassDeclaration && unitMember.name.name == name);
2221 } 2220 }
2222 2221
2223 class _MaterializeLazyElementsVisitor extends GeneralizingElementVisitor { 2222 class _MaterializeLazyElementsVisitor extends GeneralizingElementVisitor {
2224 @override 2223 @override
2225 visitExecutableElement(ExecutableElement element) { 2224 visitExecutableElement(ExecutableElement element) {
2226 element.parameters; 2225 element.parameters;
2227 super.visitExecutableElement(element); 2226 super.visitExecutableElement(element);
2228 } 2227 }
2229 } 2228 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/task/dart_work_manager_test.dart ('k') | pkg/analyzer/tool/task_dependency_graph/tasks.dot » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698