| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 listsToAnalyze.add(info); | 172 listsToAnalyze.add(info); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void visitMapTypeInformation(MapTypeInformation info) { | 175 void visitMapTypeInformation(MapTypeInformation info) { |
| 176 mapsToAnalyze.add(info); | 176 mapsToAnalyze.add(info); |
| 177 } | 177 } |
| 178 void visitConcreteTypeInformation(ConcreteTypeInformation info) {} | 178 void visitConcreteTypeInformation(ConcreteTypeInformation info) {} |
| 179 | 179 |
| 180 void visitStringLiteralTypeInformation(StringLiteralTypeInformation info) {} | 180 void visitStringLiteralTypeInformation(StringLiteralTypeInformation info) {} |
| 181 | 181 |
| 182 void visitBoolLiteralTypeInformation(BoolLiteralTypeInformation info) {} |
| 183 |
| 182 void visitClosureTypeInformation(ClosureTypeInformation info) {} | 184 void visitClosureTypeInformation(ClosureTypeInformation info) {} |
| 183 | 185 |
| 184 void visitClosureCallSiteTypeInformation( | 186 void visitClosureCallSiteTypeInformation( |
| 185 ClosureCallSiteTypeInformation info) {} | 187 ClosureCallSiteTypeInformation info) {} |
| 186 | 188 |
| 187 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { | 189 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { |
| 188 Element called = info.calledElement; | 190 Element called = info.calledElement; |
| 189 if (inferrer.types.getInferredTypeOf(called) == currentUser) { | 191 if (inferrer.types.getInferredTypeOf(called) == currentUser) { |
| 190 addNewEscapeInformation(info); | 192 addNewEscapeInformation(info); |
| 191 } | 193 } |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 } | 389 } |
| 388 if (isParameterOfListAddingMethod(info.element) || | 390 if (isParameterOfListAddingMethod(info.element) || |
| 389 isParameterOfMapAddingMethod(info.element)) { | 391 isParameterOfMapAddingMethod(info.element)) { |
| 390 // These elements are being handled in | 392 // These elements are being handled in |
| 391 // [visitDynamicCallSiteTypeInformation]. | 393 // [visitDynamicCallSiteTypeInformation]. |
| 392 return; | 394 return; |
| 393 } | 395 } |
| 394 addNewEscapeInformation(info); | 396 addNewEscapeInformation(info); |
| 395 } | 397 } |
| 396 } | 398 } |
| OLD | NEW |