| 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.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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 task.perform(); | 268 task.perform(); |
| 269 AnalysisTarget target = task.target; | 269 AnalysisTarget target = task.target; |
| 270 CacheEntry entry = context.getCacheEntry(target); | 270 CacheEntry entry = context.getCacheEntry(target); |
| 271 if (task.caughtException == null) { | 271 if (task.caughtException == null) { |
| 272 List<TargetedResult> dependedOn = item.inputTargetedResults.toList(); | 272 List<TargetedResult> dependedOn = item.inputTargetedResults.toList(); |
| 273 Map<ResultDescriptor, dynamic> outputs = task.outputs; | 273 Map<ResultDescriptor, dynamic> outputs = task.outputs; |
| 274 for (ResultDescriptor result in task.descriptor.results) { | 274 for (ResultDescriptor result in task.descriptor.results) { |
| 275 // TODO(brianwilkerson) We could check here that a value was produced | 275 // TODO(brianwilkerson) We could check here that a value was produced |
| 276 // and throw an exception if not (unless we want to allow null values). | 276 // and throw an exception if not (unless we want to allow null values). |
| 277 entry.setValue(result, outputs[result], dependedOn); | 277 entry.setValue(result, outputs[result], dependedOn); |
| 278 // if (dependedOn.length > 800) { |
| 279 // print('[${dependedOn.length}] $result or $target dependsOn: $depende
dOn'); |
| 280 // } |
| 278 } | 281 } |
| 279 outputs.forEach((ResultDescriptor descriptor, value) { | 282 outputs.forEach((ResultDescriptor descriptor, value) { |
| 280 StreamController<ComputedResult> controller = | 283 StreamController<ComputedResult> controller = |
| 281 resultComputedControllers[descriptor]; | 284 resultComputedControllers[descriptor]; |
| 282 if (controller != null) { | 285 if (controller != null) { |
| 283 ComputedResult event = | 286 ComputedResult event = |
| 284 new ComputedResult(context, descriptor, target, value); | 287 new ComputedResult(context, descriptor, target, value); |
| 285 controller.add(event); | 288 controller.add(event); |
| 286 } | 289 } |
| 287 }); | 290 }); |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 final TaskManager taskManager; | 805 final TaskManager taskManager; |
| 803 | 806 |
| 804 _WorkOrderDependencyWalker(this.taskManager, WorkItem startingNode) | 807 _WorkOrderDependencyWalker(this.taskManager, WorkItem startingNode) |
| 805 : super(startingNode); | 808 : super(startingNode); |
| 806 | 809 |
| 807 @override | 810 @override |
| 808 WorkItem getNextInput(WorkItem node, List<WorkItem> skipInputs) { | 811 WorkItem getNextInput(WorkItem node, List<WorkItem> skipInputs) { |
| 809 return node.gatherInputs(taskManager, skipInputs); | 812 return node.gatherInputs(taskManager, skipInputs); |
| 810 } | 813 } |
| 811 } | 814 } |
| OLD | NEW |