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

Side by Side Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2679243002: Make fields private, add DeclaredVariables, put library into a field. (Closed)
Patch Set: Revert 'analyzeWithoutTasks'. Created 3 years, 10 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
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/analysis_impl.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 8
9 import 'package:analyzer/context/declared_variables.dart'; 9 import 'package:analyzer/context/declared_variables.dart';
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 if (library == null) { 708 if (library == null) {
709 return null; 709 return null;
710 } 710 }
711 711
712 try { 712 try {
713 LibraryContext libraryContext = _createLibraryContext(library); 713 LibraryContext libraryContext = _createLibraryContext(library);
714 try { 714 try {
715 CompilationUnit resolvedUnit; 715 CompilationUnit resolvedUnit;
716 List<int> bytes; 716 List<int> bytes;
717 if (analyzeWithoutTasks) { 717 if (analyzeWithoutTasks) {
718 AnalyzerImpl analyzer = new AnalyzerImpl(analysisOptions, 718 AnalyzerImpl analyzer = new AnalyzerImpl(
719 sourceFactory, _fileTracker.fsState, libraryContext.store); 719 analysisOptions,
720 Map<FileState, UnitAnalysisResult> results = 720 declaredVariables,
721 analyzer.analyze(library); 721 sourceFactory,
722 _fileTracker.fsState,
723 libraryContext.store,
724 library);
725 Map<FileState, UnitAnalysisResult> results = analyzer.analyze();
722 UnitAnalysisResult fileResult = results[file]; 726 UnitAnalysisResult fileResult = results[file];
723 resolvedUnit = fileResult.unit; 727 resolvedUnit = fileResult.unit;
724 728
725 // Store the result into the cache. 729 // Store the result into the cache.
726 bytes = _storeResolvedUnit( 730 bytes = _storeResolvedUnit(
727 library, file, resolvedUnit, fileResult.errors); 731 library, file, resolvedUnit, fileResult.errors);
728 } else { 732 } else {
729 ResolutionResult resolutionResult = 733 ResolutionResult resolutionResult =
730 libraryContext.resolveUnit(library.source, file.source); 734 libraryContext.resolveUnit(library.source, file.source);
731 resolvedUnit = resolutionResult.resolvedUnit; 735 resolvedUnit = resolutionResult.resolvedUnit;
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 libraryDeclarations.add(new TopLevelDeclarationInSource( 1786 libraryDeclarations.add(new TopLevelDeclarationInSource(
1783 file.source, declaration, isExported)); 1787 file.source, declaration, isExported));
1784 } 1788 }
1785 } 1789 }
1786 } 1790 }
1787 1791
1788 // We're not done yet. 1792 // We're not done yet.
1789 return false; 1793 return false;
1790 } 1794 }
1791 } 1795 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/analysis_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698