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

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

Issue 1183533002: Compute RESOLVED_UNIT for all units in all of the libraries of the closure before verifying. (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 | « pkg/analysis_server/test/analysis_server_test.dart ('k') | 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) 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 2503 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 outputs[LIBRARY_ERRORS_READY] = true; 2514 outputs[LIBRARY_ERRORS_READY] = true;
2515 } 2515 }
2516 2516
2517 /** 2517 /**
2518 * Return a map from the names of the inputs of this kind of task to the task 2518 * Return a map from the names of the inputs of this kind of task to the task
2519 * input descriptors describing those inputs for a task with the 2519 * input descriptors describing those inputs for a task with the
2520 * given [library]. 2520 * given [library].
2521 */ 2521 */
2522 static Map<String, TaskInput> buildInputs(Source library) { 2522 static Map<String, TaskInput> buildInputs(Source library) {
2523 return <String, TaskInput>{ 2523 return <String, TaskInput>{
2524 'allLibraryElements':
2525 IMPORT_EXPORT_SOURCE_CLOSURE.of(library).toListOf(LIBRARY_ELEMENT),
2526 'allErrors': UNITS.of(library).toListOf(DART_ERRORS) 2524 'allErrors': UNITS.of(library).toListOf(DART_ERRORS)
2527 }; 2525 };
2528 } 2526 }
2529 2527
2530 /** 2528 /**
2531 * Create a [LibraryErrorsReadyTask] based on the given [target] in the given 2529 * Create a [LibraryErrorsReadyTask] based on the given [target] in the given
2532 * [context]. 2530 * [context].
2533 */ 2531 */
2534 static LibraryErrorsReadyTask createTask( 2532 static LibraryErrorsReadyTask createTask(
2535 AnalysisContext context, AnalysisTarget target) { 2533 AnalysisContext context, AnalysisTarget target) {
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
3396 uriLiteral, [directive.uriContent]); 3394 uriLiteral, [directive.uriContent]);
3397 } 3395 }
3398 3396
3399 /** 3397 /**
3400 * Return a map from the names of the inputs of this kind of task to the task 3398 * Return a map from the names of the inputs of this kind of task to the task
3401 * input descriptors describing those inputs for a task with the 3399 * input descriptors describing those inputs for a task with the
3402 * given [target]. 3400 * given [target].
3403 */ 3401 */
3404 static Map<String, TaskInput> buildInputs(LibrarySpecificUnit target) { 3402 static Map<String, TaskInput> buildInputs(LibrarySpecificUnit target) {
3405 return <String, TaskInput>{ 3403 return <String, TaskInput>{
3406 'libraryElement': LIBRARY_ELEMENT.of(target.library), 3404 'resolvedUnits': IMPORT_EXPORT_SOURCE_CLOSURE
3405 .of(target.library)
3406 .toMapOf(UNITS)
3407 .toFlattenList((Source library, Source unit) =>
3408 RESOLVED_UNIT.of(new LibrarySpecificUnit(library, unit))),
3407 UNIT_INPUT: RESOLVED_UNIT.of(target), 3409 UNIT_INPUT: RESOLVED_UNIT.of(target),
3408 TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request) 3410 TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
3409 }; 3411 };
3410 } 3412 }
3411 3413
3412 /** 3414 /**
3413 * Create a [VerifyUnitTask] based on the given [target] in 3415 * Create a [VerifyUnitTask] based on the given [target] in
3414 * the given [context]. 3416 * the given [context].
3415 */ 3417 */
3416 static VerifyUnitTask createTask( 3418 static VerifyUnitTask createTask(
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
3519 @override 3521 @override
3520 bool moveNext() { 3522 bool moveNext() {
3521 if (_newSources.isEmpty) { 3523 if (_newSources.isEmpty) {
3522 return false; 3524 return false;
3523 } 3525 }
3524 currentTarget = _newSources.first; 3526 currentTarget = _newSources.first;
3525 _newSources.remove(currentTarget); 3527 _newSources.remove(currentTarget);
3526 return true; 3528 return true;
3527 } 3529 }
3528 } 3530 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/analysis_server_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698