| 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()
|
|
|