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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 // Compute the effective address. When running under the simulator, | 939 // Compute the effective address. When running under the simulator, |
940 // this is a redirection address that forces the simulator to call | 940 // this is a redirection address that forces the simulator to call |
941 // into the runtime system. | 941 // into the runtime system. |
942 uword entry; | 942 uword entry; |
943 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); | 943 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); |
944 const bool is_leaf_call = | 944 const bool is_leaf_call = |
945 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; | 945 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; |
946 const StubEntry* stub_entry; | 946 const StubEntry* stub_entry; |
947 if (link_lazily()) { | 947 if (link_lazily()) { |
948 stub_entry = StubCode::CallBootstrapCFunction_entry(); | 948 stub_entry = StubCode::CallBootstrapCFunction_entry(); |
949 entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall); | 949 entry = NativeEntry::LinkNativeCallEntry(); |
950 #if defined(USING_SIMULATOR) | |
951 entry = Simulator::RedirectExternalReference( | |
952 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); | |
953 #endif | |
954 } else { | 950 } else { |
955 entry = reinterpret_cast<uword>(native_c_function()); | 951 entry = reinterpret_cast<uword>(native_c_function()); |
956 if (is_bootstrap_native() || is_leaf_call) { | 952 if (is_bootstrap_native() || is_leaf_call) { |
957 stub_entry = StubCode::CallBootstrapCFunction_entry(); | 953 stub_entry = StubCode::CallBootstrapCFunction_entry(); |
958 #if defined(USING_SIMULATOR) | 954 #if defined(USING_SIMULATOR) |
959 entry = Simulator::RedirectExternalReference( | 955 entry = Simulator::RedirectExternalReference( |
960 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); | 956 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); |
961 #endif | 957 #endif |
962 } else { | 958 } else { |
963 // In the case of non bootstrap native methods the CallNativeCFunction | 959 // In the case of non bootstrap native methods the CallNativeCFunction |
(...skipping 5900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6864 1, | 6860 1, |
6865 locs()); | 6861 locs()); |
6866 __ Drop(1); | 6862 __ Drop(1); |
6867 __ Pop(result); | 6863 __ Pop(result); |
6868 } | 6864 } |
6869 | 6865 |
6870 | 6866 |
6871 } // namespace dart | 6867 } // namespace dart |
6872 | 6868 |
6873 #endif // defined TARGET_ARCH_ARM | 6869 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |