| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import 'dart:math' as math; | 5 import 'dart:math' as math; |
| 6 import '../common.dart'; | 6 import '../common.dart'; |
| 7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 7 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 8 import '../common/tasks.dart' show CompilerTask; | 8 import '../common/tasks.dart' show CompilerTask; |
| 9 import '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
| 10 import '../constants/constant_system.dart'; | 10 import '../constants/constant_system.dart'; |
| (...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 if (target != null && !node.isInterceptedCall) { | 1658 if (target != null && !node.isInterceptedCall) { |
| 1659 if (target == helpers.jsArrayAdd) { | 1659 if (target == helpers.jsArrayAdd) { |
| 1660 methodName = 'push'; | 1660 methodName = 'push'; |
| 1661 } else if (target == helpers.jsArrayRemoveLast) { | 1661 } else if (target == helpers.jsArrayRemoveLast) { |
| 1662 methodName = 'pop'; | 1662 methodName = 'pop'; |
| 1663 } else if (target == helpers.jsStringSplit) { | 1663 } else if (target == helpers.jsStringSplit) { |
| 1664 methodName = 'split'; | 1664 methodName = 'split'; |
| 1665 // Split returns a List, so we make sure the backend knows the | 1665 // Split returns a List, so we make sure the backend knows the |
| 1666 // list class is instantiated. | 1666 // list class is instantiated. |
| 1667 registry.registerInstantiatedClass(commonElements.listClass); | 1667 registry.registerInstantiatedClass(commonElements.listClass); |
| 1668 } else if (backend.isNative(target) && | 1668 } else if (backend.nativeData.isNativeMember(target) && |
| 1669 target.isFunction && | 1669 target.isFunction && |
| 1670 !node.isInterceptedCall) { | 1670 !node.isInterceptedCall) { |
| 1671 // A direct (i.e. non-interceptor) native call is the result of | 1671 // A direct (i.e. non-interceptor) native call is the result of |
| 1672 // optimization. The optimization ensures any type checks or | 1672 // optimization. The optimization ensures any type checks or |
| 1673 // conversions have been satisified. | 1673 // conversions have been satisified. |
| 1674 methodName = backend.nativeData.getFixedBackendName(target); | 1674 methodName = backend.nativeData.getFixedBackendName(target); |
| 1675 } | 1675 } |
| 1676 } | 1676 } |
| 1677 | 1677 |
| 1678 js.Name methodLiteral; | 1678 js.Name methodLiteral; |
| (...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3128 registry.registerStaticUse(new StaticUse.staticInvoke( | 3128 registry.registerStaticUse(new StaticUse.staticInvoke( |
| 3129 helper, new CallStructure.unnamed(argumentCount))); | 3129 helper, new CallStructure.unnamed(argumentCount))); |
| 3130 return backend.emitter.staticFunctionAccess(helper); | 3130 return backend.emitter.staticFunctionAccess(helper); |
| 3131 } | 3131 } |
| 3132 | 3132 |
| 3133 @override | 3133 @override |
| 3134 void visitRef(HRef node) { | 3134 void visitRef(HRef node) { |
| 3135 visit(node.value); | 3135 visit(node.value); |
| 3136 } | 3136 } |
| 3137 } | 3137 } |
| OLD | NEW |