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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 315223003: Use CallBootstrapC stub for leaf native calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 63c6a9ef8b559f65eaaea3b4cbc4d4c36ec7b6d9..41f3162dfed1d6ce01315c123b122ab6c46693c9 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -807,10 +807,13 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ leal(EAX, Address(EBP, kFirstLocalSlotFromFp * kWordSize));
}
__ movl(ECX, Immediate(reinterpret_cast<uword>(native_c_function())));
- __ movl(EDX, Immediate(NativeArguments::ComputeArgcTag(function())));
- const ExternalLabel* stub_entry =
- (is_bootstrap_native()) ? &StubCode::CallBootstrapCFunctionLabel() :
- &StubCode::CallNativeCFunctionLabel();
+ const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
+ const bool is_leaf_call =
Ivan Posva 2014/06/05 17:05:29 Can you please move the variable declarations and
Cutch 2014/06/05 18:49:21 Done.
+ (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
+ __ movl(EDX, Immediate(argc_tag));
+ const ExternalLabel* stub_entry = (is_bootstrap_native() || is_leaf_call) ?
+ &StubCode::CallBootstrapCFunctionLabel() :
+ &StubCode::CallNativeCFunctionLabel();
compiler->GenerateCall(token_pos(),
stub_entry,
PcDescriptors::kOther,
@@ -3325,7 +3328,7 @@ LocationSummary* CheckEitherNonSmiInstr::MakeLocationSummary(Isolate* isolate,
ASSERT((left_cid != kDoubleCid) && (right_cid != kDoubleCid));
const intptr_t kNumInputs = 2;
const bool need_temp = (left()->definition() != right()->definition())
- &&(left_cid != kSmiCid)
+ && (left_cid != kSmiCid)
&& (right_cid != kSmiCid);
const intptr_t kNumTemps = need_temp ? 1 : 0;
LocationSummary* summary = new(isolate) LocationSummary(
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698