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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 11360116: Pass closure object as first implicit argument to closure functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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_ia32.cc ('k') | runtime/vm/native_arguments.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 14694)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -922,18 +922,14 @@
// Push the result place holder initialized to NULL.
__ PushObject(Object::ZoneHandle());
// Pass a pointer to the first argument in RAX.
- intptr_t arg_count = argument_count();
- if (is_native_instance_closure()) {
- arg_count += 1;
- }
- if (!has_optional_parameters() && !is_native_instance_closure()) {
- __ leaq(RAX, Address(RBP, (1 + arg_count) * kWordSize));
+ if (!function().HasOptionalParameters()) {
+ __ leaq(RAX, Address(RBP, (1 + function().NumParameters()) * kWordSize));
} else {
__ leaq(RAX,
Address(RBP, ParsedFunction::kFirstLocalSlotIndex * kWordSize));
}
__ movq(RBX, Immediate(reinterpret_cast<uword>(native_c_function())));
- __ movq(R10, Immediate(arg_count));
+ __ movq(R10, Immediate(NativeArguments::ComputeArgcTag(function())));
compiler->GenerateCall(token_pos(),
&StubCode::CallNativeCFunctionLabel(),
PcDescriptors::kOther,
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/native_arguments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698