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

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

Issue 1125303008: Tweaks for using task model in Editor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.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.driver; 5 library analyzer.src.task.driver;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/src/context/cache.dart'; 10 import 'package:analyzer/src/context/cache.dart';
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 * returned if some of the inputs cannot be computed and the task cannot be 359 * returned if some of the inputs cannot be computed and the task cannot be
360 * performed. Callers can differentiate between these cases by checking the 360 * performed. Callers can differentiate between these cases by checking the
361 * [exception] field. If the field is `null`, then the task can be performed; 361 * [exception] field. If the field is `null`, then the task can be performed;
362 * if the field is non-`null` then the task cannot be performed and all of the 362 * if the field is non-`null` then the task cannot be performed and all of the
363 * tasks' results should be marked as being in ERROR. 363 * tasks' results should be marked as being in ERROR.
364 */ 364 */
365 WorkItem gatherInputs(TaskManager taskManager) { 365 WorkItem gatherInputs(TaskManager taskManager) {
366 while (builder != null) { 366 while (builder != null) {
367 AnalysisTarget inputTarget = builder.currentTarget; 367 AnalysisTarget inputTarget = builder.currentTarget;
368 ResultDescriptor inputResult = builder.currentResult; 368 ResultDescriptor inputResult = builder.currentResult;
369 inputTargetedResults.add(new TargetedResult(inputTarget, inputResult)); 369 if (inputTarget is! AnalysisContextTarget) {
370 inputTargetedResults.add(new TargetedResult(inputTarget, inputResult));
371 }
370 CacheEntry inputEntry = context.getCacheEntry(inputTarget); 372 CacheEntry inputEntry = context.getCacheEntry(inputTarget);
371 CacheState inputState = inputEntry.getState(inputResult); 373 CacheState inputState = inputEntry.getState(inputResult);
372 if (inputState == CacheState.ERROR) { 374 if (inputState == CacheState.ERROR) {
373 exception = inputEntry.exception; 375 exception = inputEntry.exception;
374 return null; 376 return null;
375 } else if (inputState == CacheState.IN_PROCESS) { 377 } else if (inputState == CacheState.IN_PROCESS) {
376 // 378 //
377 // TODO(brianwilkerson) Implement this case. 379 // TODO(brianwilkerson) Implement this case.
378 // 380 //
379 // One possibility would be to return a WorkItem that would perform a 381 // One possibility would be to return a WorkItem that would perform a
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 TaskDescriptor descriptor = currentItem.descriptor; 537 TaskDescriptor descriptor = currentItem.descriptor;
536 AnalysisTarget target = currentItem.target; 538 AnalysisTarget target = currentItem.target;
537 for (WorkItem item in pendingItems) { 539 for (WorkItem item in pendingItems) {
538 if (item.descriptor == descriptor && item.target == target) { 540 if (item.descriptor == descriptor && item.target == target) {
539 return true; 541 return true;
540 } 542 }
541 } 543 }
542 return false; 544 return false;
543 } 545 }
544 } 546 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698