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 library compiler.src.inferrer.node_tracer; | 5 library compiler.src.inferrer.node_tracer; |
6 | 6 |
7 import '../common/names.dart' show Identifiers; | 7 import '../common/names.dart' show Identifiers; |
8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
10 import '../elements/entities.dart'; | 10 import '../elements/entities.dart'; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 ]); | 73 ]); |
74 | 74 |
75 /// Common logic to trace a value through the type inference graph nodes. | 75 /// Common logic to trace a value through the type inference graph nodes. |
76 abstract class TracerVisitor implements TypeInformationVisitor { | 76 abstract class TracerVisitor implements TypeInformationVisitor { |
77 final TypeInformation tracedType; | 77 final TypeInformation tracedType; |
78 final InferrerEngine inferrer; | 78 final InferrerEngine inferrer; |
79 final Compiler compiler; | 79 final Compiler compiler; |
80 | 80 |
81 static const int MAX_ANALYSIS_COUNT = | 81 static const int MAX_ANALYSIS_COUNT = |
82 const int.fromEnvironment('dart2js.tracing.limit', defaultValue: 32); | 82 const int.fromEnvironment('dart2js.tracing.limit', defaultValue: 32); |
83 final Setlet<Element> analyzedElements = new Setlet<Element>(); | 83 final Setlet<MemberEntity> analyzedElements = new Setlet<MemberEntity>(); |
84 | 84 |
85 TracerVisitor(this.tracedType, InferrerEngine inferrer) | 85 TracerVisitor(this.tracedType, InferrerEngine inferrer) |
86 : this.inferrer = inferrer, | 86 : this.inferrer = inferrer, |
87 this.compiler = inferrer.compiler; | 87 this.compiler = inferrer.compiler; |
88 | 88 |
89 // Work list that gets populated with [TypeInformation] that could | 89 // Work list that gets populated with [TypeInformation] that could |
90 // contain the container. | 90 // contain the container. |
91 final List<TypeInformation> workList = <TypeInformation>[]; | 91 final List<TypeInformation> workList = <TypeInformation>[]; |
92 | 92 |
93 // Work list of lists to analyze after analyzing the users of a | 93 // Work list of lists to analyze after analyzing the users of a |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 } | 472 } |
473 if (isParameterOfListAddingMethod(info.parameter) || | 473 if (isParameterOfListAddingMethod(info.parameter) || |
474 isParameterOfMapAddingMethod(info.parameter)) { | 474 isParameterOfMapAddingMethod(info.parameter)) { |
475 // These elements are being handled in | 475 // These elements are being handled in |
476 // [visitDynamicCallSiteTypeInformation]. | 476 // [visitDynamicCallSiteTypeInformation]. |
477 return; | 477 return; |
478 } | 478 } |
479 addNewEscapeInformation(info); | 479 addNewEscapeInformation(info); |
480 } | 480 } |
481 } | 481 } |
OLD | NEW |