OLD | NEW |
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.context.context; | 5 library analyzer.src.context.context; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import 'package:analyzer/instrumentation/instrumentation.dart'; | 10 import 'package:analyzer/instrumentation/instrumentation.dart'; |
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 setValue(INCLUDED_PARTS, Source.EMPTY_LIST); | 1086 setValue(INCLUDED_PARTS, Source.EMPTY_LIST); |
1087 setValue(IS_LAUNCHABLE, false); | 1087 setValue(IS_LAUNCHABLE, false); |
1088 setValue(LIBRARY_ELEMENT, library); | 1088 setValue(LIBRARY_ELEMENT, library); |
1089 setValue(LIBRARY_ELEMENT1, library); | 1089 setValue(LIBRARY_ELEMENT1, library); |
1090 setValue(LIBRARY_ELEMENT2, library); | 1090 setValue(LIBRARY_ELEMENT2, library); |
1091 setValue(LIBRARY_ELEMENT3, library); | 1091 setValue(LIBRARY_ELEMENT3, library); |
1092 setValue(LIBRARY_ELEMENT4, library); | 1092 setValue(LIBRARY_ELEMENT4, library); |
1093 setValue(LIBRARY_ELEMENT5, library); | 1093 setValue(LIBRARY_ELEMENT5, library); |
1094 setValue(LIBRARY_ELEMENT6, library); | 1094 setValue(LIBRARY_ELEMENT6, library); |
1095 setValue(LIBRARY_ELEMENT7, library); | 1095 setValue(LIBRARY_ELEMENT7, library); |
| 1096 setValue(LIBRARY_ELEMENT8, library); |
1096 setValue(LINE_INFO, new LineInfo(<int>[0])); | 1097 setValue(LINE_INFO, new LineInfo(<int>[0])); |
1097 setValue(PARSE_ERRORS, AnalysisError.NO_ERRORS); | 1098 setValue(PARSE_ERRORS, AnalysisError.NO_ERRORS); |
1098 entry.setState(PARSED_UNIT, CacheState.FLUSHED); | 1099 entry.setState(PARSED_UNIT, CacheState.FLUSHED); |
1099 entry.setState(RESOLVE_TYPE_NAMES_ERRORS, CacheState.FLUSHED); | 1100 entry.setState(RESOLVE_TYPE_NAMES_ERRORS, CacheState.FLUSHED); |
1100 setValue(SCAN_ERRORS, AnalysisError.NO_ERRORS); | 1101 setValue(SCAN_ERRORS, AnalysisError.NO_ERRORS); |
1101 setValue(SOURCE_KIND, SourceKind.LIBRARY); | 1102 setValue(SOURCE_KIND, SourceKind.LIBRARY); |
1102 entry.setState(TOKEN_STREAM, CacheState.FLUSHED); | 1103 entry.setState(TOKEN_STREAM, CacheState.FLUSHED); |
1103 setValue(UNITS, <Source>[librarySource]); | 1104 setValue(UNITS, <Source>[librarySource]); |
1104 | 1105 |
1105 LibrarySpecificUnit unit = | 1106 LibrarySpecificUnit unit = |
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2016 } | 2017 } |
2017 DartSdk sdk = factory.dartSdk; | 2018 DartSdk sdk = factory.dartSdk; |
2018 if (sdk == null) { | 2019 if (sdk == null) { |
2019 throw new IllegalArgumentException( | 2020 throw new IllegalArgumentException( |
2020 "The source factory for an SDK analysis context must have a DartUriRes
olver"); | 2021 "The source factory for an SDK analysis context must have a DartUriRes
olver"); |
2021 } | 2022 } |
2022 return new AnalysisCache( | 2023 return new AnalysisCache( |
2023 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); | 2024 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); |
2024 } | 2025 } |
2025 } | 2026 } |
OLD | NEW |