| Index: src/mips/code-stubs-mips.cc
|
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
|
| index dca8c9d69a8407533351062fb1998312e9e9aacd..5191e3659631741ffb117c8d2b707a5f46264e6b 100644
|
| --- a/src/mips/code-stubs-mips.cc
|
| +++ b/src/mips/code-stubs-mips.cc
|
| @@ -1178,9 +1178,8 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
| __ li(fp, Operand(pending_handler_fp_address));
|
| __ lw(fp, MemOperand(fp));
|
|
|
| - // If the handler is a JS frame, restore the context to the frame.
|
| - // (kind == ENTRY) == (fp == 0) == (cp == 0), so we could test either fp
|
| - // or cp.
|
| + // If the handler is a JS frame, restore the context to the frame. Note that
|
| + // the context will be set to (cp == 0) for non-JS frames.
|
| Label zero;
|
| __ Branch(&zero, eq, cp, Operand(zero_reg));
|
| __ sw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| @@ -1280,7 +1279,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
| handler_offset_ = handler_entry.pos();
|
| // Caught exception: Store result (exception) in the pending exception
|
| // field in the JSEnv and return a failure sentinel. Coming in here the
|
| - // fp will be invalid because the PushTryHandler below sets it to 0 to
|
| + // fp will be invalid because the PushStackHandler below sets it to 0 to
|
| // signal the existence of the JSEntry frame.
|
| __ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
| isolate)));
|
| @@ -1289,10 +1288,9 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
| __ b(&exit); // b exposes branch delay slot.
|
| __ nop(); // Branch delay slot nop.
|
|
|
| - // Invoke: Link this frame into the handler chain. There's only one
|
| - // handler block in this code object, so its index is 0.
|
| + // Invoke: Link this frame into the handler chain.
|
| __ bind(&invoke);
|
| - __ PushTryHandler(StackHandler::JS_ENTRY, 0);
|
| + __ PushStackHandler();
|
| // If an exception not caught by another handler occurs, this handler
|
| // returns control to the code after the bal(&invoke) above, which
|
| // restores all kCalleeSaved registers (including cp and fp) to their
|
| @@ -1337,7 +1335,7 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
|
| __ Call(t9);
|
|
|
| // Unlink this frame from the handler chain.
|
| - __ PopTryHandler();
|
| + __ PopStackHandler();
|
|
|
| __ bind(&exit); // v0 holds result
|
| // Check if the current stack frame is marked as the outermost JS frame.
|
|
|