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

Unified Diff: vm/intermediate_language_ia32.cc

Issue 10535180: Allow implicit 'close your eyes' of native methods. This will hopefully fix issue 3466. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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 | « vm/intermediate_language.h ('k') | vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language_ia32.cc
===================================================================
--- vm/intermediate_language_ia32.cc (revision 8752)
+++ vm/intermediate_language_ia32.cc (working copy)
@@ -568,14 +568,18 @@
// Push the result place holder initialized to NULL.
__ PushObject(Object::ZoneHandle());
// Pass a pointer to the first argument in EAX.
- if (!has_optional_parameters()) {
- __ leal(EAX, Address(EBP, (1 + argument_count()) * kWordSize));
+ intptr_t arg_count = argument_count();
+ if (is_native_instance_closure()) {
+ arg_count += 1;
+ }
+ if (!has_optional_parameters() && !is_native_instance_closure()) {
+ __ leal(EAX, Address(EBP, (1 + arg_count) * kWordSize));
} else {
__ leal(EAX,
Address(EBP, ParsedFunction::kFirstLocalSlotIndex * kWordSize));
}
__ movl(ECX, Immediate(reinterpret_cast<uword>(native_c_function())));
- __ movl(EDX, Immediate(argument_count()));
+ __ movl(EDX, Immediate(arg_count));
compiler->GenerateCall(token_index(),
try_index(),
&StubCode::CallNativeCFunctionLabel(),
« no previous file with comments | « vm/intermediate_language.h ('k') | vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698