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

Unified Diff: pkg/analyzer/lib/src/task/driver.dart

Issue 2015513003: Optimize more megamorphic dispatch sites (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698