| Index: sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
|
| index b64dba76eb029d66003cc34686b593a8f04cb3fb..c31b2c0b5b52802e1bd9b3e29976c20417a0ceb7 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart
|
| @@ -55,10 +55,6 @@ class TypeInformationSystem extends TypeSystem<TypeInformation> {
|
| final Map<Node, TypeInformation> allocatedLists =
|
| new Map<Node, TypeInformation>();
|
|
|
| - /// [ClosureTypeInformation] for allocated closures.
|
| - final Map<Node, TypeInformation> allocatedClosures =
|
| - new Map<Node, TypeInformation>();
|
| -
|
| /// Cache of [ConcreteTypeInformation].
|
| final Map<TypeMask, TypeInformation> concreteTypes =
|
| new Map<TypeMask, TypeInformation>();
|
| @@ -302,11 +298,6 @@ class TypeInformationSystem extends TypeSystem<TypeInformation> {
|
| new ListTypeInformation(mask, element, length);
|
| }
|
|
|
| - TypeInformation allocateClosure(Node node, Element element) {
|
| - return allocatedClosures[node] =
|
| - new ClosureTypeInformation(node, element);
|
| - }
|
| -
|
| TypeInformation allocateMap(TypeInformation keyType,
|
| TypeInformation valueType,
|
| ConcreteTypeInformation type) {
|
| @@ -488,16 +479,6 @@ class TypeGraphInferrerEngine
|
| workQueue.add(info.elementType);
|
| });
|
|
|
| - types.allocatedClosures.values.forEach((ClosureTypeInformation info) {
|
| - ClosureTracerVisitor tracer = new ClosureTracerVisitor(info, this);
|
| - tracer.run();
|
| - if (!tracer.continueAnalyzing) return;
|
| - FunctionElement element = info.element;
|
| - element.functionSignature.forEachParameter((parameter) {
|
| - workQueue.add(types.getInferredTypeOf(parameter));
|
| - });
|
| - });
|
| -
|
| // Reset all nodes that use lists that have been inferred, as well
|
| // as nodes that use elements fetched from these lists. The
|
| // workset for a new run of the analysis will be these nodes.
|
| @@ -628,7 +609,6 @@ class TypeGraphInferrerEngine
|
| void buildWorkQueue() {
|
| workQueue.addAll(types.typeInformations.values);
|
| workQueue.addAll(types.allocatedTypes);
|
| - workQueue.addAll(types.allocatedClosures.values);
|
| workQueue.addAll(allocatedCalls);
|
| }
|
|
|
| @@ -641,7 +621,7 @@ class TypeGraphInferrerEngine
|
| Element callee,
|
| ArgumentsTypes arguments,
|
| Selector selector,
|
| - {bool remove, bool addToQueue: true}) {
|
| + {bool remove, bool init: false}) {
|
| if (callee.name == Compiler.NO_SUCH_METHOD) return;
|
| if (callee.isField()) {
|
| if (selector.isSetter()) {
|
| @@ -651,7 +631,7 @@ class TypeGraphInferrerEngine
|
| } else {
|
| info.addAssignment(arguments.positional[0]);
|
| }
|
| - if (addToQueue) workQueue.add(info);
|
| + if (!init) workQueue.add(info);
|
| }
|
| } else if (callee.isGetter()) {
|
| return;
|
| @@ -662,7 +642,7 @@ class TypeGraphInferrerEngine
|
| signature.forEachParameter((Element parameter) {
|
| ElementTypeInformation info = types.getInferredTypeOf(parameter);
|
| info.giveUp(this);
|
| - if (addToQueue) workQueue.addAll(info.users);
|
| + if (!init) workQueue.addAll(info.users);
|
| });
|
| }
|
| } else {
|
| @@ -689,7 +669,7 @@ class TypeGraphInferrerEngine
|
| info.addAssignment(type);
|
| }
|
| parameterIndex++;
|
| - if (addToQueue) workQueue.add(info);
|
| + if (!init) workQueue.add(info);
|
| });
|
| }
|
| }
|
| @@ -876,7 +856,6 @@ class TypeGraphInferrerEngine
|
| types.typeInformations.values.forEach((info) => info.clear());
|
| types.allocatedTypes.clear();
|
| types.concreteTypes.clear();
|
| - types.allocatedClosures.clear();
|
| analyzedElements.clear();
|
| generativeConstructorsExposingThis.clear();
|
| }
|
|
|