| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 } | 443 } |
| 444 | 444 |
| 445 void visitMemberTypeInformation(MemberTypeInformation info) { | 445 void visitMemberTypeInformation(MemberTypeInformation info) { |
| 446 if (info.isClosurized) { | 446 if (info.isClosurized) { |
| 447 bailout('Returned from a closurized method'); | 447 bailout('Returned from a closurized method'); |
| 448 } | 448 } |
| 449 if (isClosure(info.element)) { | 449 if (isClosure(info.element)) { |
| 450 bailout('Returned from a closure'); | 450 bailout('Returned from a closure'); |
| 451 } | 451 } |
| 452 if (info.element.isField && | 452 if (info.element.isField && |
| 453 !inferrer.compiler.backend | 453 !inferrer.compiler.backend.canFieldBeUsedForGlobalOptimizations( |
| 454 .canFieldBeUsedForGlobalOptimizations(info.element)) { | 454 info.element, inferrer.closedWorld)) { |
| 455 bailout('Escape to code that has special backend treatment'); | 455 bailout('Escape to code that has special backend treatment'); |
| 456 } | 456 } |
| 457 addNewEscapeInformation(info); | 457 addNewEscapeInformation(info); |
| 458 } | 458 } |
| 459 | 459 |
| 460 void visitParameterTypeInformation(ParameterTypeInformation info) { | 460 void visitParameterTypeInformation(ParameterTypeInformation info) { |
| 461 ParameterElement element = info.element; | 461 ParameterElement element = info.element; |
| 462 if (inferrer.isNativeMember(element.functionDeclaration)) { | 462 if (inferrer.isNativeMember(element.functionDeclaration)) { |
| 463 bailout('Passed to a native method'); | 463 bailout('Passed to a native method'); |
| 464 } | 464 } |
| 465 if (!inferrer.compiler.backend | 465 if (!inferrer.compiler.backend |
| 466 .canFunctionParametersBeUsedForGlobalOptimizations( | 466 .canFunctionParametersBeUsedForGlobalOptimizations( |
| 467 element.functionDeclaration)) { | 467 element.functionDeclaration, inferrer.closedWorld)) { |
| 468 bailout('Escape to code that has special backend treatment'); | 468 bailout('Escape to code that has special backend treatment'); |
| 469 } | 469 } |
| 470 if (isParameterOfListAddingMethod(element) || | 470 if (isParameterOfListAddingMethod(element) || |
| 471 isParameterOfMapAddingMethod(element)) { | 471 isParameterOfMapAddingMethod(element)) { |
| 472 // These elements are being handled in | 472 // These elements are being handled in |
| 473 // [visitDynamicCallSiteTypeInformation]. | 473 // [visitDynamicCallSiteTypeInformation]. |
| 474 return; | 474 return; |
| 475 } | 475 } |
| 476 addNewEscapeInformation(info); | 476 addNewEscapeInformation(info); |
| 477 } | 477 } |
| 478 } | 478 } |
| OLD | NEW |