| 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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 } | 765 } |
| 766 | 766 |
| 767 | 767 |
| 768 LocationSummary* NativeCallInstr::MakeLocationSummary(Zone* zone, | 768 LocationSummary* NativeCallInstr::MakeLocationSummary(Zone* zone, |
| 769 bool opt) const { | 769 bool opt) const { |
| 770 return MakeCallSummary(zone); | 770 return MakeCallSummary(zone); |
| 771 } | 771 } |
| 772 | 772 |
| 773 | 773 |
| 774 void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 774 void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 775 SetupNative(); |
| 775 Register result = locs()->out(0).reg(); | 776 Register result = locs()->out(0).reg(); |
| 776 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); | 777 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); |
| 777 const bool is_leaf_call = | 778 const bool is_leaf_call = |
| 778 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; | 779 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; |
| 779 | 780 |
| 780 // Push the result place holder initialized to NULL. | 781 // Push the result place holder initialized to NULL. |
| 781 __ PushObject(Object::null_object()); | 782 __ PushObject(Object::null_object()); |
| 782 // Pass a pointer to the first argument in RAX. | 783 // Pass a pointer to the first argument in RAX. |
| 783 if (!function().HasOptionalParameters()) { | 784 if (!function().HasOptionalParameters()) { |
| 784 __ leaq(RAX, Address(RBP, (kParamEndSlotFromFp + | 785 __ leaq(RAX, Address(RBP, (kParamEndSlotFromFp + |
| 785 function().NumParameters()) * kWordSize)); | 786 function().NumParameters()) * kWordSize)); |
| 786 } else { | 787 } else { |
| 787 __ leaq(RAX, Address(RBP, kFirstLocalSlotFromFp * kWordSize)); | 788 __ leaq(RAX, Address(RBP, kFirstLocalSlotFromFp * kWordSize)); |
| 788 } | 789 } |
| (...skipping 5663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6452 __ Drop(1); | 6453 __ Drop(1); |
| 6453 __ popq(result); | 6454 __ popq(result); |
| 6454 } | 6455 } |
| 6455 | 6456 |
| 6456 | 6457 |
| 6457 } // namespace dart | 6458 } // namespace dart |
| 6458 | 6459 |
| 6459 #undef __ | 6460 #undef __ |
| 6460 | 6461 |
| 6461 #endif // defined TARGET_ARCH_X64 | 6462 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |