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 // A set of selectors we know do not escape the elements inside the | 7 // A set of selectors we know do not escape the elements inside the |
| 8 // list. | 8 // list. |
| 9 Set<String> doesNotEscapeListSet = new Set<String>.from( | 9 Set<String> doesNotEscapeListSet = new Set<String>.from( |
| 10 const <String>[ | 10 const <String>[ |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 | 68 |
| 69 abstract class TracerVisitor<T extends TypeInformation> | 69 abstract class TracerVisitor<T extends TypeInformation> |
| 70 implements TypeInformationVisitor { | 70 implements TypeInformationVisitor { |
| 71 final T tracedType; | 71 final T tracedType; |
| 72 final TypeGraphInferrerEngine inferrer; | 72 final TypeGraphInferrerEngine inferrer; |
| 73 final Compiler compiler; | 73 final Compiler compiler; |
| 74 | 74 |
| 75 static const int MAX_ANALYSIS_COUNT = 16; | 75 static const int MAX_ANALYSIS_COUNT = 16; |
| 76 final Setlet<Element> analyzedElements = new Setlet<Element>(); | 76 final Setlet<Element> analyzedElements = new Setlet<Element>(); |
| 77 | 77 |
| 78 TracerVisitor(this.tracedType, inferrer) | 78 TracerVisitor(this.tracedType, TypeGraphInferrerEngine inferrer) |
|
herhut
2015/01/29 16:03:47
Nice, I wonder how you stumbled across this one...
floitsch
2015/01/29 16:04:51
The editor renamed the inferrer.compiler field whe
| |
| 79 : this.inferrer = inferrer, this.compiler = inferrer.compiler; | 79 : this.inferrer = inferrer, this.compiler = inferrer.compiler; |
| 80 | 80 |
| 81 // Work list that gets populated with [TypeInformation] that could | 81 // Work list that gets populated with [TypeInformation] that could |
| 82 // contain the container. | 82 // contain the container. |
| 83 final List<TypeInformation> workList = <TypeInformation>[]; | 83 final List<TypeInformation> workList = <TypeInformation>[]; |
| 84 | 84 |
| 85 // Work list of lists to analyze after analyzing the users of a | 85 // Work list of lists to analyze after analyzing the users of a |
| 86 // [TypeInformation]. We know the [tracedType] has been stored in these | 86 // [TypeInformation]. We know the [tracedType] has been stored in these |
| 87 // lists and we must check how it escapes from these lists. | 87 // lists and we must check how it escapes from these lists. |
| 88 final List<ListTypeInformation> listsToAnalyze = | 88 final List<ListTypeInformation> listsToAnalyze = |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 386 } | 386 } |
| 387 if (isParameterOfListAddingMethod(info.element) || | 387 if (isParameterOfListAddingMethod(info.element) || |
| 388 isParameterOfMapAddingMethod(info.element)) { | 388 isParameterOfMapAddingMethod(info.element)) { |
| 389 // These elements are being handled in | 389 // These elements are being handled in |
| 390 // [visitDynamicCallSiteTypeInformation]. | 390 // [visitDynamicCallSiteTypeInformation]. |
| 391 return; | 391 return; |
| 392 } | 392 } |
| 393 addNewEscapeInformation(info); | 393 addNewEscapeInformation(info); |
| 394 } | 394 } |
| 395 } | 395 } |
| OLD | NEW |