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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 117723002: Allow the native resolver to setup whether it needs the Dart API scope to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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/stub_code_arm.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 31283)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -163,8 +163,18 @@
__ movl(Address(ESP, retval_offset), EAX); // Set retval in NativeArguments.
__ leal(EAX, Address(ESP, 2 * kWordSize)); // Pointer to the NativeArguments.
__ movl(Address(ESP, 0), EAX); // Pass the pointer to the NativeArguments.
+
+ // Call native function (setsup scope if not leaf function).
+ Label leaf_call;
+ Label done;
+ __ testl(EDX, Immediate(NativeArguments::AutoSetupScopeMask()));
+ __ j(ZERO, &leaf_call, Assembler::kNearJump);
__ movl(Address(ESP, kWordSize), ECX); // Function to call.
__ call(&NativeEntry::NativeCallWrapperLabel());
+ __ jmp(&done);
+ __ Bind(&leaf_call);
+ __ call(ECX);
+ __ Bind(&done);
// Reset exit frame information in Isolate structure.
__ movl(Address(CTX, Isolate::top_exit_frame_info_offset()), Immediate(0));
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698