OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 // Compute the effective address. When running under the simulator, | 793 // Compute the effective address. When running under the simulator, |
794 // this is a redirection address that forces the simulator to call | 794 // this is a redirection address that forces the simulator to call |
795 // into the runtime system. | 795 // into the runtime system. |
796 uword entry; | 796 uword entry; |
797 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); | 797 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); |
798 const bool is_leaf_call = | 798 const bool is_leaf_call = |
799 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; | 799 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; |
800 const StubEntry* stub_entry; | 800 const StubEntry* stub_entry; |
801 if (link_lazily()) { | 801 if (link_lazily()) { |
802 stub_entry = StubCode::CallBootstrapCFunction_entry(); | 802 stub_entry = StubCode::CallBootstrapCFunction_entry(); |
803 entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall); | 803 entry = NativeEntry::LinkNativeCallEntry(); |
804 #if defined(USING_SIMULATOR) | |
805 entry = Simulator::RedirectExternalReference( | |
806 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); | |
807 #endif | |
808 } else { | 804 } else { |
809 entry = reinterpret_cast<uword>(native_c_function()); | 805 entry = reinterpret_cast<uword>(native_c_function()); |
810 if (is_bootstrap_native() || is_leaf_call) { | 806 if (is_bootstrap_native() || is_leaf_call) { |
811 stub_entry = StubCode::CallBootstrapCFunction_entry(); | 807 stub_entry = StubCode::CallBootstrapCFunction_entry(); |
812 #if defined(USING_SIMULATOR) | 808 #if defined(USING_SIMULATOR) |
813 entry = Simulator::RedirectExternalReference( | 809 entry = Simulator::RedirectExternalReference( |
814 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); | 810 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); |
815 #endif | 811 #endif |
816 } else { | 812 } else { |
817 // In the case of non bootstrap native methods the CallNativeCFunction | 813 // In the case of non bootstrap native methods the CallNativeCFunction |
(...skipping 4811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5629 1, | 5625 1, |
5630 locs()); | 5626 locs()); |
5631 __ Drop(1); | 5627 __ Drop(1); |
5632 __ Pop(result); | 5628 __ Pop(result); |
5633 } | 5629 } |
5634 | 5630 |
5635 | 5631 |
5636 } // namespace dart | 5632 } // namespace dart |
5637 | 5633 |
5638 #endif // defined TARGET_ARCH_ARM64 | 5634 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |