| Index: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (revision 19482)
|
| +++ sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (working copy)
|
| @@ -225,9 +225,9 @@
|
| * Enqueues [e] in the work queue if it is valuable.
|
| */
|
| void enqueueAgain(Element e) {
|
| - Element returnType = returnTypeOf[e];
|
| + Element type = e.isField() ? typeOf[e] : returnTypeOf[e];
|
| // If we have found a type for [e], no need to re-analyze it.
|
| - if (returnType != compiler.dynamicClass) return;
|
| + if (type != compiler.dynamicClass) return;
|
| if (analyzeCount[e] > MAX_ANALYSIS_COUNT_PER_ELEMENT) return;
|
| workSet.add(e);
|
| }
|
| @@ -339,7 +339,7 @@
|
| * Returns whether the new type is worth recompiling the callers of
|
| * [analyzedElement].
|
| */
|
| - bool recordReturnType(analyzedElement, returnType) {
|
| + bool recordReturnType(FunctionElement analyzedElement, returnType) {
|
| return internalRecordType(analyzedElement, returnType, returnTypeOf);
|
| }
|
|
|
| @@ -360,7 +360,7 @@
|
| * Returns the return type of [element]. Returns [:Dynamic:] if
|
| * [element] has not been analyzed yet.
|
| */
|
| - ClassElement returnTypeOfElement(Element element) {
|
| + ClassElement returnTypeOfElement(FunctionElement element) {
|
| element = element.implementation;
|
| if (element.isGenerativeConstructor()) return element.getEnclosingClass();
|
| Element returnType = returnTypeOf[element];
|
| @@ -555,7 +555,7 @@
|
| types.forEach((_, type) {
|
| fieldType = computeLUB(fieldType, type);
|
| });
|
| - returnTypeOf[field] = fieldType;
|
| + typeOf[field] = fieldType;
|
| });
|
| }
|
|
|
| @@ -1019,6 +1019,7 @@
|
| inferrer.registerCalledElement(outermostElement, element, arguments);
|
| return inferrer.returnTypeOfElement(element);
|
| } else {
|
| + analyzeArguments(node.arguments);
|
| // Closure call on a getter. We don't have function types yet,
|
| // so we just return [:Dynamic:].
|
| return compiler.dynamicClass;
|
|
|