| Index: src/mips/code-stubs-mips.cc
|
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
|
| index 423a2e9eaf0be92f9a8da169c2156f3a2b850e8d..ce28c69c1aefbdcf9be2a124dae2dfdb50d65978 100644
|
| --- a/src/mips/code-stubs-mips.cc
|
| +++ b/src/mips/code-stubs-mips.cc
|
| @@ -3856,7 +3856,7 @@ void CEntryStub::Generate(MacroAssembler* masm) {
|
|
|
|
|
| void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
| - Label invoke, exit;
|
| + Label invoke, handler_entry, exit;
|
| Isolate* isolate = masm->isolate();
|
|
|
| // Registers:
|
| @@ -3933,14 +3933,15 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
| __ bind(&cont);
|
| __ push(t0);
|
|
|
| - // Call a faked try-block that does the invoke.
|
| - __ bal(&invoke); // bal exposes branch delay slot.
|
| - __ nop(); // Branch delay slot nop.
|
| -
|
| - // 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 signal the existence of the JSEntry frame.
|
| + // Jump to a faked try block that does the invoke, with a faked catch
|
| + // block that sets the pending exception.
|
| + __ jmp(&invoke);
|
| + __ bind(&handler_entry);
|
| + 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
|
| + // signal the existence of the JSEntry frame.
|
| __ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
|
| isolate)));
|
| __ sw(v0, MemOperand(t0)); // We come back from 'invoke'. result is in v0.
|
| @@ -3948,9 +3949,10 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
|
| __ b(&exit); // b exposes branch delay slot.
|
| __ nop(); // Branch delay slot nop.
|
|
|
| - // Invoke: Link this frame into the handler chain.
|
| + // Invoke: Link this frame into the handler chain. There's only one
|
| + // handler block in this code object, so its index is 0.
|
| __ bind(&invoke);
|
| - __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER);
|
| + __ PushTryHandler(IN_JS_ENTRY, JS_ENTRY_HANDLER, 0);
|
| // 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
|
| @@ -5103,7 +5105,7 @@ void RegExpConstructResultStub::Generate(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -void CallFunctionStub::FinishCode(Code* code) {
|
| +void CallFunctionStub::FinishCode(Handle<Code> code) {
|
| code->set_has_function_cache(false);
|
| }
|
|
|
|
|