| 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 '../common.dart'; | 5 import '../common.dart'; |
| 6 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 6 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 7 import '../common/tasks.dart' show CompilerTask; | 7 import '../common/tasks.dart' show CompilerTask; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../constants/constant_system.dart'; | 9 import '../constants/constant_system.dart'; |
| 10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
| (...skipping 2850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2861 registry.registerStaticUse( | 2861 registry.registerStaticUse( |
| 2862 new StaticUse.staticInvoke(helperElement, CallStructure.ONE_ARG)); | 2862 new StaticUse.staticInvoke(helperElement, CallStructure.ONE_ARG)); |
| 2863 | 2863 |
| 2864 use(node.inputs[0]); | 2864 use(node.inputs[0]); |
| 2865 if (node.hasReceiver) { | 2865 if (node.hasReceiver) { |
| 2866 if (backend.isInterceptorClass(element.enclosingClass)) { | 2866 if (backend.isInterceptorClass(element.enclosingClass)) { |
| 2867 int index = element.index; | 2867 int index = element.index; |
| 2868 js.Expression receiver = pop(); | 2868 js.Expression receiver = pop(); |
| 2869 js.Expression helper = | 2869 js.Expression helper = |
| 2870 backend.emitter.staticFunctionAccess(helperElement); | 2870 backend.emitter.staticFunctionAccess(helperElement); |
| 2871 push(js.js(r'#(#.$builtinTypeInfo && #.$builtinTypeInfo[#])', | 2871 push(js.js(r'#(#.$ti && #.$ti[#])', |
| 2872 [helper, receiver, receiver, js.js.number(index)])); | 2872 [helper, receiver, receiver, js.js.number(index)])); |
| 2873 } else { | 2873 } else { |
| 2874 backend.emitter.registerReadTypeVariable(element); | 2874 backend.emitter.registerReadTypeVariable(element); |
| 2875 push(js.js( | 2875 push(js.js( |
| 2876 '#.#()', [pop(), backend.namer.nameForReadTypeVariable(element)])); | 2876 '#.#()', [pop(), backend.namer.nameForReadTypeVariable(element)])); |
| 2877 } | 2877 } |
| 2878 } else { | 2878 } else { |
| 2879 push(js.js('#(#)', | 2879 push(js.js('#(#)', |
| 2880 [backend.emitter.staticFunctionAccess(helperElement), pop()])); | 2880 [backend.emitter.staticFunctionAccess(helperElement), pop()])); |
| 2881 } | 2881 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2914 registry.registerStaticUse(new StaticUse.staticInvoke( | 2914 registry.registerStaticUse(new StaticUse.staticInvoke( |
| 2915 helper, new CallStructure.unnamed(argumentCount))); | 2915 helper, new CallStructure.unnamed(argumentCount))); |
| 2916 return backend.emitter.staticFunctionAccess(helper); | 2916 return backend.emitter.staticFunctionAccess(helper); |
| 2917 } | 2917 } |
| 2918 | 2918 |
| 2919 @override | 2919 @override |
| 2920 void visitRef(HRef node) { | 2920 void visitRef(HRef node) { |
| 2921 visit(node.value); | 2921 visit(node.value); |
| 2922 } | 2922 } |
| 2923 } | 2923 } |
| OLD | NEW |