| Index: src/compiler/mips/code-generator-mips.cc
|
| diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc
|
| index a7806ccae236c2ee0e83399386915b1480f9d299..4d87f2c2434c331db521d7b71e07db2d80bf6fc0 100644
|
| --- a/src/compiler/mips/code-generator-mips.cc
|
| +++ b/src/compiler/mips/code-generator-mips.cc
|
| @@ -399,10 +399,6 @@ void CodeGenerator::AssembleDeconstructActivationRecord() {
|
| int stack_slots = frame()->GetSpillSlotCount();
|
| if (descriptor->IsJSFunctionCall() || stack_slots > 0) {
|
| __ LeaveFrame(StackFrame::MANUAL);
|
| - int pop_count = descriptor->IsJSFunctionCall()
|
| - ? static_cast<int>(descriptor->JSParameterCount())
|
| - : 0;
|
| - __ Drop(pop_count);
|
| }
|
| }
|
|
|
| @@ -1157,8 +1153,14 @@ void CodeGenerator::AssembleReturn() {
|
| __ Pop(ra, fp);
|
| int pop_count = descriptor->IsJSFunctionCall()
|
| ? static_cast<int>(descriptor->JSParameterCount())
|
| - : 0;
|
| - __ DropAndRet(pop_count);
|
| + : (info()->IsStub()
|
| + ? info()->code_stub()->GetStackParameterCount()
|
| + : 0);
|
| + if (pop_count != 0) {
|
| + __ DropAndRet(pop_count);
|
| + } else {
|
| + __ Ret();
|
| + }
|
| }
|
| } else {
|
| __ Ret();
|
|
|