| Index: sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
|
| index b54ae28c0967fabc99e66163b3a10574b37d50c8..29c46fa18505befe00c0ea942751842e66081982 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
|
| @@ -111,10 +111,6 @@ class TypeMaskSystem implements TypeSystem<TypeMask> {
|
| return type;
|
| }
|
|
|
| - TypeMask allocateClosure(Node node, Element element) {
|
| - return functionType;
|
| - }
|
| -
|
| Selector newTypedSelector(TypeMask receiver, Selector selector) {
|
| return new TypedSelector(receiver, selector);
|
| }
|
| @@ -570,7 +566,10 @@ class SimpleTypeInferrerVisitor<T>
|
|
|
| // Record the types of captured non-boxed variables. Types of
|
| // these variables may already be there, because of an analysis of
|
| - // a previous closure.
|
| + // a previous closure. Note that analyzing the same closure multiple
|
| + // times closure will refine the type of those variables, therefore
|
| + // [:inferrer.typeOf[variable]:] is not necessarilly null, nor the
|
| + // same as [newType].
|
| ClosureClassMap nestedClosureData =
|
| compiler.closureToClassMapper.getMappingForNestedFunction(node);
|
| nestedClosureData.forEachCapturedVariable((variable, field) {
|
| @@ -585,19 +584,7 @@ class SimpleTypeInferrerVisitor<T>
|
| capturedVariables.add(variable);
|
| });
|
|
|
| - return inferrer.concreteTypes.putIfAbsent(node, () {
|
| - return types.allocateClosure(node, element);
|
| - });
|
| - }
|
| -
|
| - T visitFunctionDeclaration(FunctionDeclaration node) {
|
| - Element element = elements[node];
|
| - T type = inferrer.concreteTypes.putIfAbsent(node.function, () {
|
| - return types.allocateClosure(node.function, element);
|
| - });
|
| - locals.update(element, type, node);
|
| - visit(node.function);
|
| - return type;
|
| + return types.functionType;
|
| }
|
|
|
| T visitLiteralList(LiteralList node) {
|
|
|