Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index 43ae8ee5959177c502f7e0a39858d51a280bfbf0..fffd37f519db9c9dcb19fb44d5640de8e39093e9 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -95,7 +95,7 @@ static void InitializeArrayConstructorDescriptor(Isolate* isolate, |
// stack param count needs (constructor pointer, and single argument) |
descriptor->stack_parameter_count_ = &rax; |
descriptor->register_params_ = registers; |
- descriptor->extra_expression_stack_count_ = 1; |
+ descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
descriptor->deoptimization_handler_ = |
FUNCTION_ADDR(ArrayConstructor_StubFailure); |
} |
@@ -6783,8 +6783,10 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { |
__ movq(rbx, MemOperand(rbp, parameter_count_offset)); |
masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); |
__ pop(rcx); |
- __ lea(rsp, MemOperand(rsp, rbx, times_pointer_size, |
- extra_expression_stack_count_ * kPointerSize)); |
+ int additional_offset = function_mode_ == JS_FUNCTION_STUB_MODE |
+ ? kPointerSize |
+ : 0; |
+ __ lea(rsp, MemOperand(rsp, rbx, times_pointer_size, additional_offset)); |
__ jmp(rcx); // Return to IC Miss stub, continuation still on stack. |
} |