Index: pkg/analyzer/lib/src/task/driver.dart |
diff --git a/pkg/analyzer/lib/src/task/driver.dart b/pkg/analyzer/lib/src/task/driver.dart |
index b0cabae2d60557fd9000a3145e5e44e1b40627b1..70ebe3ba5a5e3d01c063baacdb98099b111ebef2 100644 |
--- a/pkg/analyzer/lib/src/task/driver.dart |
+++ b/pkg/analyzer/lib/src/task/driver.dart |
@@ -280,7 +280,10 @@ class AnalysisDriver { |
if (task.caughtException == null) { |
List<TargetedResult> dependedOn = item.inputTargetedResults.toList(); |
Map<ResultDescriptor, dynamic> outputs = task.outputs; |
- for (ResultDescriptor result in task.descriptor.results) { |
+ List<ResultDescriptor> results = task.descriptor.results; |
+ int resultLength = results.length; |
+ for (int i = 0; i < resultLength; i++) { |
+ ResultDescriptor result = results[i]; |
// TODO(brianwilkerson) We could check here that a value was produced |
// and throw an exception if not (unless we want to allow null values). |
entry.setValue(result, outputs[result], dependedOn); |