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

Unified Diff: src/arm/macro-assembler-arm.h

Issue 6170001: Direct call api functions (arm implementation) (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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
Index: src/arm/macro-assembler-arm.h
===================================================================
--- src/arm/macro-assembler-arm.h (revision 6213)
+++ src/arm/macro-assembler-arm.h (working copy)
@@ -256,7 +256,8 @@
// Expects the number of arguments in register r0 and
// the builtin function to call in register r1. Exits with argc in
// r4, argv in r6, and and the builtin function to call in r5.
- void EnterExitFrame(bool save_doubles);
+ // |stack_space| pending pushes, used for alignment before call to C.
Erik Corry 2011/01/21 14:28:40 We haven't used this |parameter_name| style elsewh
antonm 2011/01/21 17:56:36 Erik, it was my request. I saw this style in vari
Zaheer 2011/01/24 09:43:31 i have replaced |stack_space| -> stack_space -
Erik Corry 2011/01/24 21:45:15 Sorry for causing this confusion. I didn't check
+ void EnterExitFrame(bool save_doubles, int stack_space);
// Leave the current exit frame. Expects the return value in r0.
void LeaveExitFrame(bool save_doubles);
@@ -588,6 +589,12 @@
// Call a code stub.
void TailCallStub(CodeStub* stub, Condition cond = al);
+ // Tail call a code stub (jump) and return the code object called. Try to
+ // generate the code if necessary. Do not perform a GC but instead return
+ // a retry after GC failure.
+ MUST_USE_RESULT MaybeObject* TryTailCallStub(CodeStub* stub,
+ Condition cond = al);
+
// Call a runtime routine.
void CallRuntime(Runtime::Function* f, int num_arguments);
void CallRuntimeSaveDoubles(Runtime::FunctionId id);
@@ -606,6 +613,12 @@
int num_arguments,
int result_size);
+ // Tail call of a runtime routine (jump). Try to generate the code if
+ // necessary. Do not perform a GC but instead return a retry after GC
+ // failure.
+ MUST_USE_RESULT MaybeObject* TryTailCallExternalReference(
+ const ExternalReference& ext, int num_arguments, int result_size);
+
// Convenience function: tail call a runtime routine (jump).
void TailCallRuntime(Runtime::FunctionId fid,
int num_arguments,
@@ -629,9 +642,25 @@
void CallCFunction(ExternalReference function, int num_arguments);
void CallCFunction(Register function, int num_arguments);
+ // Creates the exit frame, pushes the arguments and aligns the stack
+ // for the C call. saves the fp and context in top.
+ // |arg_stack_space| - space allocated for the structure (e.g.
+ // v8::arguments in a direct call) on top of the exit frame.
+ // |unwind_space| - space to be unwound on exit (includes the call js
+ // arguments space and the additonal space allocated for the fast call).
+ void PrepareCallApiFunction(int arg_stack_space,
+ int unwind_space);
+
+ // Calls an API function. Allocates HandleScope, extracts
+ // returned value from handle and propagates exceptions.
+ // Restores context.
+ MaybeObject* TryCallApiFunctionAndReturn(ApiFunction* function);
+
// Jump to a runtime routine.
void JumpToExternalReference(const ExternalReference& builtin);
+ MaybeObject* TryJumpToExternalReference(const ExternalReference& ext);
+
// Invoke specified builtin JavaScript function. Adds an entry to
// the unresolved list if the name does not resolve.
void InvokeBuiltin(Builtins::JavaScript id, InvokeJSFlags flags);

Powered by Google App Engine
This is Rietveld 408576698