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

Side by Side Diff: runtime/vm/intermediate_language_arm64.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 // 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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 } else { 811 } else {
812 __ AddImmediate(R2, FP, kFirstLocalSlotFromFp * kWordSize); 812 __ AddImmediate(R2, FP, kFirstLocalSlotFromFp * kWordSize);
813 } 813 }
814 // Compute the effective address. When running under the simulator, 814 // Compute the effective address. When running under the simulator,
815 // this is a redirection address that forces the simulator to call 815 // this is a redirection address that forces the simulator to call
816 // into the runtime system. 816 // into the runtime system.
817 uword entry; 817 uword entry;
818 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); 818 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
819 const StubEntry* stub_entry; 819 const StubEntry* stub_entry;
820 if (link_lazily()) { 820 if (link_lazily()) {
821 stub_entry = StubCode::CallBootstrapCFunction_entry(); 821 stub_entry = StubCode::CallBootstrapNative_entry();
822 entry = NativeEntry::LinkNativeCallEntry(); 822 entry = NativeEntry::LinkNativeCallEntry();
823 } else { 823 } else {
824 entry = reinterpret_cast<uword>(native_c_function()); 824 entry = reinterpret_cast<uword>(native_c_function());
825 if (is_bootstrap_native()) { 825 if (is_bootstrap_native()) {
826 stub_entry = StubCode::CallBootstrapCFunction_entry(); 826 stub_entry = StubCode::CallBootstrapNative_entry();
827 #if defined(USING_SIMULATOR) 827 #if defined(USING_SIMULATOR)
828 entry = Simulator::RedirectExternalReference( 828 entry = Simulator::RedirectExternalReference(
829 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); 829 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
zra 2017/04/04 15:00:44 ditto
830 #endif 830 #endif
831 } else if (is_auto_scope()) {
832 // In the case of non bootstrap native methods the CallNativeCFunction
833 // stub generates the redirection address when running under the simulator
834 // and hence we do not change 'entry' here.
835 stub_entry = StubCode::CallAutoScopeNative_entry();
831 } else { 836 } else {
832 // In the case of non bootstrap native methods the CallNativeCFunction 837 // In the case of non bootstrap native methods the CallNativeCFunction
833 // stub generates the redirection address when running under the simulator 838 // stub generates the redirection address when running under the simulator
834 // and hence we do not change 'entry' here. 839 // and hence we do not change 'entry' here.
835 stub_entry = StubCode::CallNativeCFunction_entry(); 840 stub_entry = StubCode::CallNoScopeNative_entry();
836 } 841 }
837 } 842 }
838 __ LoadImmediate(R1, argc_tag); 843 __ LoadImmediate(R1, argc_tag);
839 ExternalLabel label(entry); 844 ExternalLabel label(entry);
840 __ LoadNativeEntry(R5, &label); 845 __ LoadNativeEntry(R5, &label);
841 if (link_lazily()) { 846 if (link_lazily()) {
842 compiler->GeneratePatchableCall(token_pos(), *stub_entry, 847 compiler->GeneratePatchableCall(token_pos(), *stub_entry,
843 RawPcDescriptors::kOther, locs()); 848 RawPcDescriptors::kOther, locs());
844 } else { 849 } else {
845 compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther, 850 compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther,
(...skipping 5204 matching lines...) Expand 10 before | Expand all | Expand 10 after
6050 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), 6055 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
6051 kGrowRegExpStackRuntimeEntry, 1, locs()); 6056 kGrowRegExpStackRuntimeEntry, 1, locs());
6052 __ Drop(1); 6057 __ Drop(1);
6053 __ Pop(result); 6058 __ Pop(result);
6054 } 6059 }
6055 6060
6056 6061
6057 } // namespace dart 6062 } // namespace dart
6058 6063
6059 #endif // defined TARGET_ARCH_ARM64 6064 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698