| Index: src/mips64/code-stubs-mips64.cc
|
| diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
|
| index 74477b557bff04bb9cee26c9f98a1be43ea6b605..0f83a613c162fb93c71d0dee56b2dcbd051a6dd6 100644
|
| --- a/src/mips64/code-stubs-mips64.cc
|
| +++ b/src/mips64/code-stubs-mips64.cc
|
| @@ -1173,9 +1173,8 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
| __ li(fp, Operand(pending_handler_fp_address));
|
| __ ld(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));
|
| __ sd(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| @@ -1281,7 +1280,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(a4, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
| isolate)));
|
| @@ -1290,10 +1289,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.
|
|
|