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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/container_tracer.dart

Issue 82953002: Inline the fixed array constructor manually in the SSA builder. Also track whether a fixed array ev… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/inferrer/container_tracer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/inferrer/container_tracer.dart (revision 30610)
+++ sdk/lib/_internal/compiler/implementation/inferrer/container_tracer.dart (working copy)
@@ -139,9 +139,9 @@
// The list of found assignments to the container.
final List<TypeInformation> assignments = <TypeInformation>[];
- bool enableLengthTracking = true;
+ bool callsGrowableMethod = false;
bool continueAnalyzing = true;
-
+
static const int MAX_ANALYSIS_COUNT = 16;
final Setlet<Element> analyzedElements = new Setlet<Element>();
@@ -178,7 +178,7 @@
}
if (continueAnalyzing) {
- if (enableLengthTracking && container.inferredLength == null) {
+ if (!callsGrowableMethod && container.inferredLength == null) {
container.inferredLength = container.originalLength;
}
return assignments;
@@ -193,7 +193,7 @@
'because: $reason');
}
continueAnalyzing = false;
- enableLengthTracking = false;
+ callsGrowableMethod = true;
}
visitNarrowTypeInformation(NarrowTypeInformation info) {}
@@ -248,10 +248,10 @@
}
}
if (!doNotChangeLengthSelectorsSet.contains(selectorName)) {
- enableLengthTracking = false;
+ callsGrowableMethod = true;
}
if (selectorName == 'length' && selector.isSetter()) {
- enableLengthTracking = false;
+ callsGrowableMethod = true;
assignments.add(inferrer.types.nullType);
}
} else if (selector.isCall()
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698