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