OLD | NEW |
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/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement; | 10 import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement; |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 new LibrarySpecificUnit(libraryFile.source, file.source), | 750 new LibrarySpecificUnit(libraryFile.source, file.source), |
751 COMPILATION_UNIT_ELEMENT); | 751 COMPILATION_UNIT_ELEMENT); |
752 } finally { | 752 } finally { |
753 analysisContext.dispose(); | 753 analysisContext.dispose(); |
754 } | 754 } |
755 } | 755 } |
756 | 756 |
757 AnalysisContext _createAnalysisContext(_LibraryContext libraryContext) { | 757 AnalysisContext _createAnalysisContext(_LibraryContext libraryContext) { |
758 AnalysisContextImpl analysisContext = | 758 AnalysisContextImpl analysisContext = |
759 AnalysisEngine.instance.createAnalysisContext(); | 759 AnalysisEngine.instance.createAnalysisContext(); |
| 760 analysisContext.useSdkCachePartition = false; |
760 analysisContext.analysisOptions = _analysisOptions; | 761 analysisContext.analysisOptions = _analysisOptions; |
761 analysisContext.sourceFactory = _sourceFactory.clone(); | 762 analysisContext.sourceFactory = _sourceFactory.clone(); |
762 analysisContext.contentCache = new _ContentCacheWrapper(_fsState); | 763 analysisContext.contentCache = new _ContentCacheWrapper(_fsState); |
763 analysisContext.resultProvider = | 764 analysisContext.resultProvider = |
764 new InputPackagesResultProvider(analysisContext, libraryContext.store); | 765 new InputPackagesResultProvider(analysisContext, libraryContext.store); |
765 return analysisContext; | 766 return analysisContext; |
766 } | 767 } |
767 | 768 |
768 /** | 769 /** |
769 * Return the context in which the [library] should be analyzed it. | 770 * Return the context in which the [library] should be analyzed it. |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1689 libraryDeclarations.add(new TopLevelDeclarationInSource( | 1690 libraryDeclarations.add(new TopLevelDeclarationInSource( |
1690 file.source, declaration, isExported)); | 1691 file.source, declaration, isExported)); |
1691 } | 1692 } |
1692 } | 1693 } |
1693 } | 1694 } |
1694 | 1695 |
1695 // We're not done yet. | 1696 // We're not done yet. |
1696 return false; | 1697 return false; |
1697 } | 1698 } |
1698 } | 1699 } |
OLD | NEW |