Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of type_graph_inferrer; | 5 part of type_graph_inferrer; |
| 6 | 6 |
| 7 class ClosureTracerVisitor extends TracerVisitor<ApplyableTypeInformation> { | 7 class ClosureTracerVisitor extends TracerVisitor<ApplyableTypeInformation> { |
| 8 final Iterable<FunctionElement> tracedElements; | 8 final Iterable<FunctionElement> tracedElements; |
| 9 final List<CallSiteTypeInformation> callsToAnalyze = | 9 final List<CallSiteTypeInformation> callsToAnalyze = |
| 10 new List<CallSiteTypeInformation>(); | 10 new List<CallSiteTypeInformation>(); |
| 11 | 11 |
| 12 ClosureTracerVisitor(this.tracedElements, tracedType, inferrer) | 12 ClosureTracerVisitor(this.tracedElements, tracedType, inferrer) |
| 13 : super(tracedType, inferrer); | 13 : super(tracedType, inferrer); |
| 14 | 14 |
| 15 void run() { | 15 void run() { |
| 16 for (FunctionElement e in tracedElements) { | 16 for (FunctionElement e in tracedElements) { |
|
herhut
2014/09/23 13:03:42
This entire for loop is now a no-op.
karlklose
2014/09/23 13:08:08
Removed.
| |
| 17 e.functionSignature.forEachParameter((Element parameter) { | 17 e.functionSignature.forEachParameter((Element parameter) { |
| 18 ElementTypeInformation info = | 18 ElementTypeInformation info = |
| 19 inferrer.types.getInferredTypeOf(parameter); | 19 inferrer.types.getInferredTypeOf(parameter); |
| 20 info.maybeResume(); | |
| 21 }); | 20 }); |
| 22 } | 21 } |
| 23 analyze(); | 22 analyze(); |
| 24 if (!continueAnalyzing) return; | 23 if (!continueAnalyzing) return; |
| 25 callsToAnalyze.forEach(analyzeCall); | 24 callsToAnalyze.forEach(analyzeCall); |
| 26 for(FunctionElement e in tracedElements) { | 25 for(FunctionElement e in tracedElements) { |
| 27 e.functionSignature.forEachParameter((Element parameter) { | 26 e.functionSignature.forEachParameter((Element parameter) { |
| 28 ElementTypeInformation info = | 27 ElementTypeInformation info = |
| 29 inferrer.types.getInferredTypeOf(parameter); | 28 inferrer.types.getInferredTypeOf(parameter); |
| 30 info.disableInferenceForClosures = false; | 29 info.disableInferenceForClosures = false; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 | 119 |
| 121 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { | 120 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { |
| 122 super.visitStaticCallSiteTypeInformation(info); | 121 super.visitStaticCallSiteTypeInformation(info); |
| 123 if (info.calledElement == tracedElements.first | 122 if (info.calledElement == tracedElements.first |
| 124 && info.selector != null | 123 && info.selector != null |
| 125 && info.selector.isGetter) { | 124 && info.selector.isGetter) { |
| 126 addNewEscapeInformation(info); | 125 addNewEscapeInformation(info); |
| 127 } | 126 } |
| 128 } | 127 } |
| 129 } | 128 } |
| OLD | NEW |