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

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

Issue 1165283006: Build full LIBRARY_ELEMENT for every library source in the import/export closure, when resolve a un… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | pkg/analyzer/test/src/task/dart_test.dart » ('j') | 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) 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.task.dart; 5 library analyzer.src.task.dart;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:analyzer/src/context/cache.dart'; 10 import 'package:analyzer/src/context/cache.dart';
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 * 236 *
237 * The result is only available for [Source]s representing a library. 237 * The result is only available for [Source]s representing a library.
238 */ 238 */
239 final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT4 = 239 final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT4 =
240 new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT4', null, 240 new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT4', null,
241 cachingPolicy: ELEMENT_CACHING_POLICY); 241 cachingPolicy: ELEMENT_CACHING_POLICY);
242 242
243 /** 243 /**
244 * The partial [LibraryElement] associated with a library. 244 * The partial [LibraryElement] associated with a library.
245 * 245 *
246 * [LIBRARY_ELEMENT4] plus [RESOLVED_UNIT4] for every unit. 246 * [LIBRARY_ELEMENT4] plus resolved types for every element.
247 * 247 *
248 * The result is only available for [Source]s representing a library. 248 * The result is only available for [Source]s representing a library.
249 */ 249 */
250 final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT5 = 250 final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT5 =
251 new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT5', null, 251 new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT5', null,
252 cachingPolicy: ELEMENT_CACHING_POLICY); 252 cachingPolicy: ELEMENT_CACHING_POLICY);
253 253
254 /** 254 /**
255 * The flag specifying whether all analysis errors are computed in a specific 255 * The flag specifying whether all analysis errors are computed in a specific
256 * library. 256 * library.
(...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after
3124 outputs[RESOLVED_UNIT5] = unit; 3124 outputs[RESOLVED_UNIT5] = unit;
3125 } 3125 }
3126 3126
3127 /** 3127 /**
3128 * Return a map from the names of the inputs of this kind of task to the task 3128 * Return a map from the names of the inputs of this kind of task to the task
3129 * input descriptors describing those inputs for a task with the 3129 * input descriptors describing those inputs for a task with the
3130 * given [target]. 3130 * given [target].
3131 */ 3131 */
3132 static Map<String, TaskInput> buildInputs(LibrarySpecificUnit target) { 3132 static Map<String, TaskInput> buildInputs(LibrarySpecificUnit target) {
3133 return <String, TaskInput>{ 3133 return <String, TaskInput>{
3134 'fullyBuiltLibraryElements': IMPORT_EXPORT_SOURCE_CLOSURE
3135 .of(target.library)
3136 .toListOf(LIBRARY_ELEMENT),
3134 LIBRARY_INPUT: LIBRARY_ELEMENT.of(target.library), 3137 LIBRARY_INPUT: LIBRARY_ELEMENT.of(target.library),
3135 UNIT_INPUT: RESOLVED_UNIT4.of(target), 3138 UNIT_INPUT: RESOLVED_UNIT4.of(target),
3136 TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request) 3139 TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
3137 }; 3140 };
3138 } 3141 }
3139 3142
3140 /** 3143 /**
3141 * Create a [ResolveVariableReferencesTask] based on the given [target] in 3144 * Create a [ResolveVariableReferencesTask] based on the given [target] in
3142 * the given [context]. 3145 * the given [context].
3143 */ 3146 */
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
3428 @override 3431 @override
3429 bool moveNext() { 3432 bool moveNext() {
3430 if (_newSources.isEmpty) { 3433 if (_newSources.isEmpty) {
3431 return false; 3434 return false;
3432 } 3435 }
3433 currentTarget = _newSources.first; 3436 currentTarget = _newSources.first;
3434 _newSources.remove(currentTarget); 3437 _newSources.remove(currentTarget);
3435 return true; 3438 return true;
3436 } 3439 }
3437 } 3440 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698