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

Unified Diff: runtime/vm/stub_code_arm.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/stack_frame_test.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
===================================================================
--- runtime/vm/stub_code_arm.cc (revision 31283)
+++ runtime/vm/stub_code_arm.cc (working copy)
@@ -181,8 +181,14 @@
// For now, space is reserved on the stack and we pass a pointer to it.
__ stm(IA, SP, (1 << R0) | (1 << R1) | (1 << R2) | (1 << R3));
__ mov(R0, ShifterOperand(SP)); // Pass the pointer to the NativeArguments.
+
+ // Call native function (setsup scope if not leaf function).
+ Label leaf_call;
+ Label done;
+ __ TestImmediate(R1, NativeArguments::AutoSetupScopeMask());
+ __ b(&leaf_call, EQ);
+
__ mov(R1, ShifterOperand(R5)); // Pass the function entrypoint to call.
-
// Call native function invocation wrapper or redirection via simulator.
#if defined(USING_SIMULATOR)
uword entry = reinterpret_cast<uword>(NativeEntry::NativeCallWrapper);
@@ -193,7 +199,14 @@
#else
__ BranchLink(&NativeEntry::NativeCallWrapperLabel());
#endif
+ __ b(&done);
+ __ Bind(&leaf_call);
+ // Call native function or redirection via simulator.
+ __ blx(R5);
+
+ __ Bind(&done);
+
// Reset exit frame information in Isolate structure.
__ LoadImmediate(R2, 0);
__ StoreToOffset(kWord, R2, CTX, Isolate::top_exit_frame_info_offset());
« no previous file with comments | « runtime/vm/stack_frame_test.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698