OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/opt_code_generator.h" | 8 #include "vm/opt_code_generator.h" |
9 | 9 |
10 #include "vm/assembler_macros.h" | 10 #include "vm/assembler_macros.h" |
(...skipping 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2729 } | 2729 } |
2730 | 2730 |
2731 | 2731 |
2732 void OptimizingCodeGenerator::GenerateDirectCall( | 2732 void OptimizingCodeGenerator::GenerateDirectCall( |
2733 intptr_t node_id, | 2733 intptr_t node_id, |
2734 intptr_t token_index, | 2734 intptr_t token_index, |
2735 const Function& target, | 2735 const Function& target, |
2736 intptr_t arg_count, | 2736 intptr_t arg_count, |
2737 const Array& optional_argument_names) { | 2737 const Array& optional_argument_names) { |
2738 ASSERT(!target.IsNull()); | 2738 ASSERT(!target.IsNull()); |
2739 const Code& code = Code::Handle(target.code()); | 2739 const Code& code = Code::Handle(target.CurrentCode()); |
2740 ASSERT(!code.IsNull()); | 2740 ASSERT(!code.IsNull()); |
2741 ExternalLabel target_label("DirectInstanceCall", code.EntryPoint()); | 2741 ExternalLabel target_label("DirectInstanceCall", code.EntryPoint()); |
2742 | 2742 |
2743 __ LoadObject(ECX, target); | 2743 __ LoadObject(ECX, target); |
2744 __ LoadObject(EDX, ArgumentsDescriptor(arg_count, optional_argument_names)); | 2744 __ LoadObject(EDX, ArgumentsDescriptor(arg_count, optional_argument_names)); |
2745 __ call(&target_label); | 2745 __ call(&target_label); |
2746 AddCurrentDescriptor(PcDescriptors::kOther, node_id, token_index); | 2746 AddCurrentDescriptor(PcDescriptors::kOther, node_id, token_index); |
2747 __ addl(ESP, Immediate(arg_count * kWordSize)); | 2747 __ addl(ESP, Immediate(arg_count * kWordSize)); |
2748 } | 2748 } |
2749 | 2749 |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3148 } | 3148 } |
3149 } | 3149 } |
3150 // TODO(srdjan): Implement unary kSUB (negate) Mint. | 3150 // TODO(srdjan): Implement unary kSUB (negate) Mint. |
3151 CodeGenerator::VisitUnaryOpNode(node); | 3151 CodeGenerator::VisitUnaryOpNode(node); |
3152 } | 3152 } |
3153 | 3153 |
3154 | 3154 |
3155 } // namespace dart | 3155 } // namespace dart |
3156 | 3156 |
3157 #endif // defined TARGET_ARCH_IA32 | 3157 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |