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

Unified Diff: runtime/vm/intermediate_language_ia32.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_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index c575924bf5062b5d4b886c05dc0da93d53698246..4a87dec752cd77c768f38c77391e63e591ed7aaa 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -848,9 +848,13 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// There is no lazy-linking support on ia32.
ASSERT(!link_lazily());
- stub_entry = (is_bootstrap_native())
- ? StubCode::CallBootstrapCFunction_entry()
- : StubCode::CallNativeCFunction_entry();
+ if (is_bootstrap_native()) {
+ stub_entry = StubCode::CallBootstrapNative_entry();
+ } else if (is_auto_scope()) {
+ stub_entry = StubCode::CallAutoScopeNative_entry();
+ } else {
+ stub_entry = StubCode::CallNoScopeNative_entry();
+ }
const ExternalLabel label(reinterpret_cast<uword>(native_c_function()));
__ movl(ECX, Immediate(label.address()));
compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther,

Powered by Google App Engine
This is Rietveld 408576698