Index: src/arm/builtins-arm.cc |
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
index af5da61a61ff00c51090295d5ecea01e979df7e1..efb42c0edfb4d29a918cadbfa0f0ab9d56d12ed4 100644 |
--- a/src/arm/builtins-arm.cc |
+++ b/src/arm/builtins-arm.cc |
@@ -1103,7 +1103,8 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm, Register index, |
// static |
-void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) { |
+void Builtins::Generate_InterpreterPushArgsAndCallImpl( |
+ MacroAssembler* masm, TailCallMode tail_call_mode) { |
// ----------- S t a t e ------------- |
// -- r0 : the number of arguments (not including the receiver) |
// -- r2 : the address of the first argument to be pushed. Subsequent |
@@ -1121,7 +1122,9 @@ void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) { |
Generate_InterpreterPushArgs(masm, r2, r3, r4); |
// Call the target. |
- __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); |
+ __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, |
+ tail_call_mode), |
+ RelocInfo::CODE_TARGET); |
} |
@@ -2065,6 +2068,16 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg, |
__ cmp(scratch1, Operand(0)); |
__ b(ne, &done); |
+ // Drop possible interpreter handler/stub frame. |
+ { |
+ Label no_interpreter_frame; |
+ __ ldr(scratch3, MemOperand(fp, StandardFrameConstants::kMarkerOffset)); |
+ __ cmp(scratch3, Operand(Smi::FromInt(StackFrame::STUB))); |
+ __ b(ne, &no_interpreter_frame); |
+ __ ldr(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
+ __ bind(&no_interpreter_frame); |
+ } |
+ |
// Check if next frame is an arguments adaptor frame. |
Label no_arguments_adaptor, formal_parameter_count_loaded; |
__ ldr(scratch2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |