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) { | 278 // if (dependedOn.length > 250) { |
279 // print('[${dependedOn.length}] $result or $target dependsOn: $depende
dOn'); | 279 // print('[${dependedOn.length}] $result or $target dependsOn: $depende
dOn'); |
280 // } | 280 // } |
281 } | 281 } |
282 outputs.forEach((ResultDescriptor descriptor, value) { | 282 outputs.forEach((ResultDescriptor descriptor, value) { |
283 StreamController<ComputedResult> controller = | 283 StreamController<ComputedResult> controller = |
284 resultComputedControllers[descriptor]; | 284 resultComputedControllers[descriptor]; |
285 if (controller != null) { | 285 if (controller != null) { |
286 ComputedResult event = | 286 ComputedResult event = |
287 new ComputedResult(context, descriptor, target, value); | 287 new ComputedResult(context, descriptor, target, value); |
288 controller.add(event); | 288 controller.add(event); |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 final TaskManager taskManager; | 805 final TaskManager taskManager; |
806 | 806 |
807 _WorkOrderDependencyWalker(this.taskManager, WorkItem startingNode) | 807 _WorkOrderDependencyWalker(this.taskManager, WorkItem startingNode) |
808 : super(startingNode); | 808 : super(startingNode); |
809 | 809 |
810 @override | 810 @override |
811 WorkItem getNextInput(WorkItem node, List<WorkItem> skipInputs) { | 811 WorkItem getNextInput(WorkItem node, List<WorkItem> skipInputs) { |
812 return node.gatherInputs(taskManager, skipInputs); | 812 return node.gatherInputs(taskManager, skipInputs); |
813 } | 813 } |
814 } | 814 } |
OLD | NEW |