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 '../types/types.dart' show ContainerTypeMask, MapTypeMask; | 10 import '../types/types.dart' show ContainerTypeMask, MapTypeMask; |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 bailoutIfReaches(isParameterOfListAddingMethod); | 374 bailoutIfReaches(isParameterOfListAddingMethod); |
375 } | 375 } |
376 } | 376 } |
377 | 377 |
378 if (info.targetsIncludeComplexNoSuchMethod(inferrer) && | 378 if (info.targetsIncludeComplexNoSuchMethod(inferrer) && |
379 info.arguments != null && | 379 info.arguments != null && |
380 info.arguments.contains(currentUser)) { | 380 info.arguments.contains(currentUser)) { |
381 bailout('Passed to noSuchMethod'); | 381 bailout('Passed to noSuchMethod'); |
382 } | 382 } |
383 | 383 |
384 Iterable<Element> inferredTargetTypes = info.targets.map((element) { | 384 Iterable<Element> inferredTargetTypes = |
| 385 info.targets.map((MemberElement element) { |
385 return inferrer.types.getInferredTypeOf(element); | 386 return inferrer.types.getInferredTypeOf(element); |
386 }); | 387 }); |
387 if (inferredTargetTypes.any((user) => user == currentUser)) { | 388 if (inferredTargetTypes.any((user) => user == currentUser)) { |
388 addNewEscapeInformation(info); | 389 addNewEscapeInformation(info); |
389 } | 390 } |
390 } | 391 } |
391 | 392 |
392 /** | 393 /** |
393 * Check whether element is the parameter of a list adding method. | 394 * Check whether element is the parameter of a list adding method. |
394 * The definition of what a list adding method is has to stay in sync with | 395 * The definition of what a list adding method is has to stay in sync with |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 } | 460 } |
460 if (isParameterOfListAddingMethod(element) || | 461 if (isParameterOfListAddingMethod(element) || |
461 isParameterOfMapAddingMethod(element)) { | 462 isParameterOfMapAddingMethod(element)) { |
462 // These elements are being handled in | 463 // These elements are being handled in |
463 // [visitDynamicCallSiteTypeInformation]. | 464 // [visitDynamicCallSiteTypeInformation]. |
464 return; | 465 return; |
465 } | 466 } |
466 addNewEscapeInformation(info); | 467 addNewEscapeInformation(info); |
467 } | 468 } |
468 } | 469 } |
OLD | NEW |