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

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

Issue 2703903002: Store analysis results for all parts of analyzed library. (Closed)
Patch Set: 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 | « no previous file | 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 List<int> bytes; 728 List<int> bytes;
729 if (analyzeWithoutTasks) { 729 if (analyzeWithoutTasks) {
730 LibraryAnalyzer analyzer = new LibraryAnalyzer( 730 LibraryAnalyzer analyzer = new LibraryAnalyzer(
731 analysisOptions, 731 analysisOptions,
732 declaredVariables, 732 declaredVariables,
733 sourceFactory, 733 sourceFactory,
734 _fileTracker.fsState, 734 _fileTracker.fsState,
735 libraryContext.store, 735 libraryContext.store,
736 library); 736 library);
737 Map<FileState, UnitAnalysisResult> results = analyzer.analyze(); 737 Map<FileState, UnitAnalysisResult> results = analyzer.analyze();
738 UnitAnalysisResult fileResult = results[file]; 738 for (FileState unitFile in results.keys) {
739 resolvedUnit = fileResult.unit; 739 UnitAnalysisResult unitResult = results[unitFile];
740 740 List<int> unitBytes = _storeResolvedUnit(
741 // Store the result into the cache. 741 library, unitFile, unitResult.unit, unitResult.errors);
742 bytes = _storeResolvedUnit( 742 if (unitFile == file) {
743 library, file, resolvedUnit, fileResult.errors); 743 bytes = unitBytes;
744 resolvedUnit = unitResult.unit;
745 }
746 }
744 } else { 747 } else {
745 ResolutionResult resolutionResult = 748 ResolutionResult resolutionResult =
746 libraryContext.resolveUnit(library.source, file.source); 749 libraryContext.resolveUnit(library.source, file.source);
747 resolvedUnit = resolutionResult.resolvedUnit; 750 resolvedUnit = resolutionResult.resolvedUnit;
748 List<AnalysisError> errors = resolutionResult.errors; 751 List<AnalysisError> errors = resolutionResult.errors;
749 752
750 // Store the result into the cache. 753 // Store the result into the cache.
751 bytes = _storeResolvedUnit(library, file, resolvedUnit, errors); 754 bytes = _storeResolvedUnit(library, file, resolvedUnit, errors);
752 } 755 }
753 756
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1862 libraryDeclarations.add(new TopLevelDeclarationInSource( 1865 libraryDeclarations.add(new TopLevelDeclarationInSource(
1863 file.source, declaration, isExported)); 1866 file.source, declaration, isExported));
1864 } 1867 }
1865 } 1868 }
1866 } 1869 }
1867 1870
1868 // We're not done yet. 1871 // We're not done yet.
1869 return false; 1872 return false;
1870 } 1873 }
1871 } 1874 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698