Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: runtime/vm/intermediate_language_arm.cc

Issue 2793163002: Do not embed is_auto_setup_scope into the compilation of native calls. (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698