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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 2793163002: Do not embed is_auto_setup_scope into the compilation of native calls. (Closed)
Patch Set: . Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language_mips.cc
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index 286902a260a8705d6f5d5681225ec24b91e4cd41..30a9ccc40ffb8d0f230350ebe6d445f55b07abd8 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -1034,21 +1034,26 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
const StubEntry* stub_entry;
if (link_lazily()) {
- stub_entry = StubCode::CallBootstrapCFunction_entry();
+ stub_entry = StubCode::CallBootstrapNative_entry();
entry = NativeEntry::LinkNativeCallEntry();
} else {
entry = reinterpret_cast<uword>(native_c_function());
if (is_bootstrap_native()) {
- stub_entry = StubCode::CallBootstrapCFunction_entry();
+ stub_entry = StubCode::CallBootstrapNative_entry();
#if defined(USING_SIMULATOR)
entry = Simulator::RedirectExternalReference(
entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
zra 2017/04/04 15:00:45 ditto
#endif
+ } else if (is_auto_scope()) {
+ // In the case of non bootstrap native methods the CallNativeCFunction
+ // stub generates the redirection address when running under the simulator
+ // and hence we do not change 'entry' here.
+ stub_entry = StubCode::CallAutoScopeNative_entry();
} else {
// In the case of non bootstrap native methods the CallNativeCFunction
// stub generates the redirection address when running under the simulator
// and hence we do not change 'entry' here.
- stub_entry = StubCode::CallNativeCFunction_entry();
+ stub_entry = StubCode::CallNoScopeNative_entry();
}
}
__ LoadImmediate(A1, argc_tag);

Powered by Google App Engine
This is Rietveld 408576698