OLD | NEW |
---|---|
1 | 1 |
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. | 6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
7 #if defined(TARGET_ARCH_ARM) | 7 #if defined(TARGET_ARCH_ARM) |
8 | 8 |
9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
10 | 10 |
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
966 } else { | 966 } else { |
967 __ AddImmediate(R2, FP, kFirstLocalSlotFromFp * kWordSize); | 967 __ AddImmediate(R2, FP, kFirstLocalSlotFromFp * kWordSize); |
968 } | 968 } |
969 // Compute the effective address. When running under the simulator, | 969 // Compute the effective address. When running under the simulator, |
970 // this is a redirection address that forces the simulator to call | 970 // this is a redirection address that forces the simulator to call |
971 // into the runtime system. | 971 // into the runtime system. |
972 uword entry; | 972 uword entry; |
973 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); | 973 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); |
974 const StubEntry* stub_entry; | 974 const StubEntry* stub_entry; |
975 if (link_lazily()) { | 975 if (link_lazily()) { |
976 stub_entry = StubCode::CallBootstrapCFunction_entry(); | 976 stub_entry = StubCode::CallBootstrapNative_entry(); |
977 entry = NativeEntry::LinkNativeCallEntry(); | 977 entry = NativeEntry::LinkNativeCallEntry(); |
978 } else { | 978 } else { |
979 entry = reinterpret_cast<uword>(native_c_function()); | 979 entry = reinterpret_cast<uword>(native_c_function()); |
980 if (is_bootstrap_native()) { | 980 if (is_bootstrap_native()) { |
981 stub_entry = StubCode::CallBootstrapCFunction_entry(); | 981 stub_entry = StubCode::CallBootstrapNative_entry(); |
982 #if defined(USING_SIMULATOR) | 982 #if defined(USING_SIMULATOR) |
983 entry = Simulator::RedirectExternalReference( | 983 entry = Simulator::RedirectExternalReference( |
984 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); | 984 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); |
zra
2017/04/04 15:00:44
Is there any change needed to this code to point t
rmacnak
2017/04/04 19:25:41
No. The simulator doesn't associate the redirectio
| |
985 #endif | 985 #endif |
986 } else if (is_auto_scope()) { | |
987 // In the case of non bootstrap native methods the CallNativeCFunction | |
988 // stub generates the redirection address when running under the simulator | |
989 // and hence we do not change 'entry' here. | |
990 stub_entry = StubCode::CallAutoScopeNative_entry(); | |
986 } else { | 991 } else { |
987 // In the case of non bootstrap native methods the CallNativeCFunction | 992 // In the case of non bootstrap native methods the CallNativeCFunction |
988 // stub generates the redirection address when running under the simulator | 993 // stub generates the redirection address when running under the simulator |
989 // and hence we do not change 'entry' here. | 994 // and hence we do not change 'entry' here. |
990 stub_entry = StubCode::CallNativeCFunction_entry(); | 995 stub_entry = StubCode::CallNoScopeNative_entry(); |
991 } | 996 } |
992 } | 997 } |
993 __ LoadImmediate(R1, argc_tag); | 998 __ LoadImmediate(R1, argc_tag); |
994 ExternalLabel label(entry); | 999 ExternalLabel label(entry); |
995 __ LoadNativeEntry(R9, &label, link_lazily() ? kPatchable : kNotPatchable); | 1000 __ LoadNativeEntry(R9, &label, link_lazily() ? kPatchable : kNotPatchable); |
996 if (link_lazily()) { | 1001 if (link_lazily()) { |
997 compiler->GeneratePatchableCall(token_pos(), *stub_entry, | 1002 compiler->GeneratePatchableCall(token_pos(), *stub_entry, |
998 RawPcDescriptors::kOther, locs()); | 1003 RawPcDescriptors::kOther, locs()); |
999 } else { | 1004 } else { |
1000 compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther, | 1005 compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther, |
(...skipping 6256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7257 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), | 7262 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), |
7258 kGrowRegExpStackRuntimeEntry, 1, locs()); | 7263 kGrowRegExpStackRuntimeEntry, 1, locs()); |
7259 __ Drop(1); | 7264 __ Drop(1); |
7260 __ Pop(result); | 7265 __ Pop(result); |
7261 } | 7266 } |
7262 | 7267 |
7263 | 7268 |
7264 } // namespace dart | 7269 } // namespace dart |
7265 | 7270 |
7266 #endif // defined TARGET_ARCH_ARM | 7271 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |