| Index: src/ia32/builtins-ia32.cc
|
| diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
|
| index bc54b3e207f11deb306f337eb358b8407b00abc3..dd1ecb422a55d874d471248638ce67c3a7e49a58 100644
|
| --- a/src/ia32/builtins-ia32.cc
|
| +++ b/src/ia32/builtins-ia32.cc
|
| @@ -676,7 +676,8 @@ static void Generate_InterpreterPushArgs(MacroAssembler* masm,
|
|
|
|
|
| // static
|
| -void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
|
| +void Builtins::Generate_InterpreterPushArgsAndCallImpl(
|
| + MacroAssembler* masm, TailCallMode tail_call_mode) {
|
| // ----------- S t a t e -------------
|
| // -- eax : the number of arguments (not including the receiver)
|
| // -- ebx : the address of the first argument to be pushed. Subsequent
|
| @@ -699,7 +700,9 @@ void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
|
|
|
| // Call the target.
|
| __ Push(edx); // Re-push return address.
|
| - __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET);
|
| + __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny,
|
| + tail_call_mode),
|
| + RelocInfo::CODE_TARGET);
|
| }
|
|
|
|
|
| @@ -1989,6 +1992,16 @@ void PrepareForTailCall(MacroAssembler* masm, Register args_reg,
|
| __ cmp(scratch1, Immediate(0));
|
| __ j(not_equal, &done, Label::kNear);
|
|
|
| + // Drop possible interpreter handler/stub frame.
|
| + {
|
| + Label no_interpreter_frame;
|
| + __ cmp(Operand(ebp, StandardFrameConstants::kMarkerOffset),
|
| + Immediate(Smi::FromInt(StackFrame::STUB)));
|
| + __ j(not_equal, &no_interpreter_frame, Label::kNear);
|
| + __ mov(ebp, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
|
| + __ bind(&no_interpreter_frame);
|
| + }
|
| +
|
| // Check if next frame is an arguments adaptor frame.
|
| Label no_arguments_adaptor, formal_parameter_count_loaded;
|
| __ mov(scratch2, Operand(ebp, StandardFrameConstants::kCallerFPOffset));
|
|
|