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

Unified Diff: runtime/vm/intermediate_language_x64.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_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 5dd33d066c84c2485e97b4d040a81be65710d2b0..55f64e92449612c9454afe60c10f167fd61098dc 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -812,15 +812,19 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ LoadImmediate(R10, Immediate(argc_tag));
const StubEntry* stub_entry;
if (link_lazily()) {
- stub_entry = StubCode::CallBootstrapCFunction_entry();
+ stub_entry = StubCode::CallBootstrapNative_entry();
ExternalLabel label(NativeEntry::LinkNativeCallEntry());
__ LoadNativeEntry(RBX, &label, kPatchable);
compiler->GeneratePatchableCall(token_pos(), *stub_entry,
RawPcDescriptors::kOther, locs());
} else {
- 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()));
__ LoadNativeEntry(RBX, &label, kNotPatchable);
compiler->GenerateCall(token_pos(), *stub_entry, RawPcDescriptors::kOther,

Powered by Google App Engine
This is Rietveld 408576698