| Index: src/mips/builtins-mips.cc
|
| diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc
|
| index de62d59fe798d16a220e394cb3674da5e9fde1af..9bdc1e1bd8294430e63c2be7b32c3b2dfc357420 100644
|
| --- a/src/mips/builtins-mips.cc
|
| +++ b/src/mips/builtins-mips.cc
|
| @@ -1432,6 +1432,7 @@ static void Generate_ApplyHelper(MacroAssembler* masm, bool targetIsArgument) {
|
| __ InvokeBuiltin(Builtins::APPLY_PREPARE, CALL_FUNCTION);
|
| }
|
|
|
| + // Returns the result in v0.
|
| Generate_CheckStackOverflow(masm, kFunctionOffset);
|
|
|
| // Push current limit and index.
|
| @@ -1536,7 +1537,7 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
|
| const int kStackSize = kFormalParameters + 1;
|
|
|
| {
|
| - FrameAndConstantPoolScope frame_scope(masm, StackFrame::INTERNAL);
|
| + FrameScope frame_scope(masm, StackFrame::INTERNAL);
|
| const int kNewTargetOffset = kFPOnStackSize + kPCOnStackSize;
|
| const int kArgumentsOffset = kNewTargetOffset + kPointerSize;
|
| const int kFunctionOffset = kArgumentsOffset + kPointerSize;
|
| @@ -1557,8 +1558,10 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
|
| __ push(a0);
|
| __ lw(a0, MemOperand(fp, kNewTargetOffset)); // get the new.target
|
| __ push(a0);
|
| + // Returns argument count in v0.
|
| __ InvokeBuiltin(Builtins::REFLECT_CONSTRUCT_PREPARE, CALL_FUNCTION);
|
|
|
| + // Returns result in v0.
|
| Generate_CheckStackOverflow(masm, kFunctionOffset);
|
|
|
| // Push current limit and index.
|
| @@ -1591,8 +1594,8 @@ static void Generate_ConstructHelper(MacroAssembler* masm) {
|
|
|
| // Leave internal frame.
|
| }
|
| - __ Addu(sp, sp, Operand(kStackSize * kPointerSize));
|
| - __ Jump(ra);
|
| + __ jr(ra);
|
| + __ Addu(sp, sp, Operand(kStackSize * kPointerSize)); // In delay slot.
|
| }
|
|
|
|
|
|
|