Index: src/mips/macro-assembler-mips.h |
diff --git a/src/mips/macro-assembler-mips.h b/src/mips/macro-assembler-mips.h |
index 0b89951e692f7793e6a5166a0decc9ea5dbd3f58..ea49dfa30c33b851895a1e3dea27c5f1d51d2410 100644 |
--- a/src/mips/macro-assembler-mips.h |
+++ b/src/mips/macro-assembler-mips.h |
@@ -581,23 +581,21 @@ DECLARE_NOTARGET_PROTOTYPE(Ret) |
void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } |
// Enter exit frame. |
- // Expects the number of arguments in register a0 and |
- // the builtin function to call in register a1. |
- // On output hold_argc, hold_function, and hold_argv are setup. |
- void EnterExitFrame(Register hold_argc, |
- Register hold_argv, |
- Register hold_function, |
- bool save_doubles); |
+ // argc - argument count to be dropped by LeaveExitFrame. |
+ // save_doubles - saves FPU registers on stack, currently disabled. |
+ // stack_space - extra stack space. |
+ void EnterExitFrame(bool save_doubles, |
+ int stack_space = 0); |
- // Leave the current exit frame. Expects the return value in v0. |
- void LeaveExitFrame(bool save_doubles); |
- |
- // Align the stack by optionally pushing a Smi zero. |
- void AlignStack(int offset); // TODO(mips) : remove this function. |
+ // Leave the current exit frame. |
+ void LeaveExitFrame(bool save_doubles, Register arg_count); |
// Get the actual activation frame alignment for target environment. |
static int ActivationFrameAlignment(); |
+ // Make sure the stack is aligned. Only emits code in debug mode. |
+ void AssertStackIsAligned(); |
+ |
void LoadContext(Register dst, int context_chain_length); |
void LoadGlobalFunction(int index, Register function); |
@@ -669,6 +667,13 @@ DECLARE_NOTARGET_PROTOTYPE(Ret) |
// Must preserve the result register. |
void PopTryHandler(); |
+ // Passes thrown value (in v0) to the handler of top of the try handler chain. |
+ void Throw(Register value); |
+ |
+ // Propagates an uncatchable exception to the top of the current JS stack's |
+ // handler chain. |
+ void ThrowUncatchable(UncatchableExceptionType type, Register value); |
+ |
// Copies a fixed number of fields of heap objects from src to dst. |
void CopyFields(Register dst, Register src, RegList temps, int field_count); |
@@ -790,9 +795,27 @@ DECLARE_NOTARGET_PROTOTYPE(Ret) |
void CallStub(CodeStub* stub, Condition cond = cc_always, |
Register r1 = zero_reg, const Operand& r2 = Operand(zero_reg)); |
+ // Call a code stub 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* TryCallStub(CodeStub* stub, |
+ Condition cond = cc_always, |
+ Register r1 = zero_reg, |
+ const Operand& r2 = |
+ Operand(zero_reg)); |
+ |
// Tail call a code stub (jump). |
void TailCallStub(CodeStub* stub); |
+ // 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 = cc_always, |
+ Register r1 = zero_reg, |
+ const Operand& r2 = |
+ Operand(zero_reg)); |
+ |
void CallJSExitStub(CodeStub* stub); |
// Call a runtime routine. |
@@ -813,6 +836,12 @@ DECLARE_NOTARGET_PROTOTYPE(Ret) |
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, |
@@ -840,12 +869,18 @@ DECLARE_NOTARGET_PROTOTYPE(Ret) |
// function). |
void CallCFunction(ExternalReference function, int num_arguments); |
void CallCFunction(Register function, Register scratch, int num_arguments); |
- |
void GetCFunctionDoubleResult(const DoubleRegister dst); |
+ // Calls an API function. Allocates HandleScope, extracts returned value |
+ // from handle and propagates exceptions. Restores context. |
+ MaybeObject* TryCallApiFunctionAndReturn(ExternalReference function, |
+ int stack_space); |
+ |
// Jump to the builtin 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, |