Index: src/x64/code-stubs-x64.cc |
=================================================================== |
--- src/x64/code-stubs-x64.cc (revision 7902) |
+++ src/x64/code-stubs-x64.cc (working copy) |
@@ -3270,9 +3270,14 @@ |
__ Load(rax, js_entry_sp); |
__ testq(rax, rax); |
__ j(not_zero, ¬_outermost_js); |
+ __ Push(Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME)); |
__ movq(rax, rbp); |
__ Store(js_entry_sp, rax); |
+ Label cont; |
+ __ jmp(&cont); |
__ bind(¬_outermost_js); |
+ __ Push(Smi::FromInt(StackFrame::INNER_JSENTRY_FRAME)); |
+ __ bind(&cont); |
#endif |
// Call a faked try-block that does the invoke. |
@@ -3314,25 +3319,20 @@ |
__ call(kScratchRegister); |
// Unlink this frame from the handler chain. |
- Operand handler_operand = |
- masm->ExternalOperand(ExternalReference(Isolate::k_handler_address, |
- isolate)); |
- __ pop(handler_operand); |
- // Pop next_sp. |
- __ addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize)); |
+ __ PopTryHandler(); |
+ __ bind(&exit); |
#ifdef ENABLE_LOGGING_AND_PROFILING |
- // If current RBP value is the same as js_entry_sp value, it means that |
- // the current function is the outermost. |
+ // Check if the current stack frame is marked as the outermost JS frame. |
+ __ pop(rbx); |
+ __ Cmp(rbx, Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME)); |
+ __ j(not_equal, ¬_outermost_js_2); |
__ movq(kScratchRegister, js_entry_sp); |
- __ cmpq(rbp, Operand(kScratchRegister, 0)); |
- __ j(not_equal, ¬_outermost_js_2); |
__ movq(Operand(kScratchRegister, 0), Immediate(0)); |
__ bind(¬_outermost_js_2); |
#endif |
// Restore the top frame descriptor from the stack. |
- __ bind(&exit); |
{ |
Operand c_entry_fp_operand = masm->ExternalOperand(c_entry_fp); |
__ pop(c_entry_fp_operand); |