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

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 1486663003: Ensure that a complete library element has constants evaluated (issue 24890) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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.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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 setValue(INCLUDED_PARTS, Source.EMPTY_LIST); 1150 setValue(INCLUDED_PARTS, Source.EMPTY_LIST);
1151 setValue(IS_LAUNCHABLE, false); 1151 setValue(IS_LAUNCHABLE, false);
1152 setValue(LIBRARY_ELEMENT, library); 1152 setValue(LIBRARY_ELEMENT, library);
1153 setValue(LIBRARY_ELEMENT1, library); 1153 setValue(LIBRARY_ELEMENT1, library);
1154 setValue(LIBRARY_ELEMENT2, library); 1154 setValue(LIBRARY_ELEMENT2, library);
1155 setValue(LIBRARY_ELEMENT3, library); 1155 setValue(LIBRARY_ELEMENT3, library);
1156 setValue(LIBRARY_ELEMENT4, library); 1156 setValue(LIBRARY_ELEMENT4, library);
1157 setValue(LIBRARY_ELEMENT5, library); 1157 setValue(LIBRARY_ELEMENT5, library);
1158 setValue(LIBRARY_ELEMENT6, library); 1158 setValue(LIBRARY_ELEMENT6, library);
1159 setValue(LIBRARY_ELEMENT7, library); 1159 setValue(LIBRARY_ELEMENT7, library);
1160 setValue(LIBRARY_ELEMENT8, library);
1160 setValue(LINE_INFO, new LineInfo(<int>[0])); 1161 setValue(LINE_INFO, new LineInfo(<int>[0]));
1161 setValue(PARSE_ERRORS, AnalysisError.NO_ERRORS); 1162 setValue(PARSE_ERRORS, AnalysisError.NO_ERRORS);
1162 entry.setState(PARSED_UNIT, CacheState.FLUSHED); 1163 entry.setState(PARSED_UNIT, CacheState.FLUSHED);
1163 entry.setState(RESOLVE_TYPE_NAMES_ERRORS, CacheState.FLUSHED); 1164 entry.setState(RESOLVE_TYPE_NAMES_ERRORS, CacheState.FLUSHED);
1164 setValue(SCAN_ERRORS, AnalysisError.NO_ERRORS); 1165 setValue(SCAN_ERRORS, AnalysisError.NO_ERRORS);
1165 setValue(SOURCE_KIND, SourceKind.LIBRARY); 1166 setValue(SOURCE_KIND, SourceKind.LIBRARY);
1166 entry.setState(TOKEN_STREAM, CacheState.FLUSHED); 1167 entry.setState(TOKEN_STREAM, CacheState.FLUSHED);
1167 setValue(UNITS, <Source>[librarySource]); 1168 setValue(UNITS, <Source>[librarySource]);
1168 1169
1169 LibrarySpecificUnit unit = 1170 LibrarySpecificUnit unit =
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 DartSdk sdk = factory.dartSdk; 2157 DartSdk sdk = factory.dartSdk;
2157 if (sdk == null) { 2158 if (sdk == null) {
2158 throw new IllegalArgumentException( 2159 throw new IllegalArgumentException(
2159 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2160 "The source factory for an SDK analysis context must have a DartUriRes olver");
2160 } 2161 }
2161 return new AnalysisCache(<CachePartition>[ 2162 return new AnalysisCache(<CachePartition>[
2162 AnalysisEngine.instance.partitionManager_new.forSdk(sdk) 2163 AnalysisEngine.instance.partitionManager_new.forSdk(sdk)
2163 ]); 2164 ]);
2164 } 2165 }
2165 } 2166 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698