| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 if (element.isParameter | 357 if (element.isParameter |
| 358 && inferrer.isNativeElement(element.enclosingElement)) { | 358 && inferrer.isNativeElement(element.enclosingElement)) { |
| 359 bailout('Passed to a native method'); | 359 bailout('Passed to a native method'); |
| 360 } | 360 } |
| 361 if (info.isClosurized) { | 361 if (info.isClosurized) { |
| 362 bailout('Returned from a closurized method'); | 362 bailout('Returned from a closurized method'); |
| 363 } | 363 } |
| 364 if (isClosure(info.element)) { | 364 if (isClosure(info.element)) { |
| 365 bailout('Returned from a closure'); | 365 bailout('Returned from a closure'); |
| 366 } | 366 } |
| 367 if (compiler.backend.isNeededForReflection(info.element)) { | 367 if (compiler.backend.isAccessibleByReflection(info.element)) { |
| 368 bailout('Escape in reflection'); | 368 bailout('Escape in reflection'); |
| 369 } | 369 } |
| 370 if (!inferrer.compiler.backend | 370 if (!inferrer.compiler.backend |
| 371 .canBeUsedForGlobalOptimizations(info.element)) { | 371 .canBeUsedForGlobalOptimizations(info.element)) { |
| 372 bailout('Escape to code that has special backend treatment'); | 372 bailout('Escape to code that has special backend treatment'); |
| 373 } | 373 } |
| 374 if (isParameterOfListAddingMethod(info.element) || | 374 if (isParameterOfListAddingMethod(info.element) || |
| 375 isParameterOfMapAddingMethod(info.element)) { | 375 isParameterOfMapAddingMethod(info.element)) { |
| 376 // These elements are being handled in | 376 // These elements are being handled in |
| 377 // [visitDynamicCallSiteTypeInformation]. | 377 // [visitDynamicCallSiteTypeInformation]. |
| 378 return; | 378 return; |
| 379 } | 379 } |
| 380 addNewEscapeInformation(info); | 380 addNewEscapeInformation(info); |
| 381 } | 381 } |
| 382 } | 382 } |
| OLD | NEW |