| Index: src/compiler/arm/code-generator-arm.cc
|
| diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc
|
| index 44d70dcd128fb62613d00809f17954f25977145a..7b848ac812b5bd54ae83a21ec4be87ce9b5a9597 100644
|
| --- a/src/compiler/arm/code-generator-arm.cc
|
| +++ b/src/compiler/arm/code-generator-arm.cc
|
| @@ -354,12 +354,16 @@ Condition FlagsConditionToCondition(FlagsCondition condition) {
|
| } while (0)
|
|
|
|
|
| -void CodeGenerator::AssembleDeconstructActivationRecord() {
|
| +void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) {
|
| CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
|
| int stack_slots = frame()->GetSpillSlotCount();
|
| if (descriptor->IsJSFunctionCall() || stack_slots > 0) {
|
| __ LeaveFrame(StackFrame::MANUAL);
|
| }
|
| + if (stack_param_delta < 0) {
|
| + int offset = -stack_param_delta * kPointerSize;
|
| + __ add(sp, sp, Operand(offset));
|
| + }
|
| }
|
|
|
|
|
| @@ -385,7 +389,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| break;
|
| }
|
| case kArchTailCallCodeObject: {
|
| - AssembleDeconstructActivationRecord();
|
| + int stack_param_delta = i.InputInt32(instr->InputCount() - 1);
|
| + AssembleDeconstructActivationRecord(stack_param_delta);
|
| if (instr->InputAt(0)->IsImmediate()) {
|
| __ Jump(Handle<Code>::cast(i.InputHeapObject(0)),
|
| RelocInfo::CODE_TARGET);
|
| @@ -420,7 +425,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| __ cmp(cp, kScratchReg);
|
| __ Assert(eq, kWrongFunctionContext);
|
| }
|
| - AssembleDeconstructActivationRecord();
|
| + int stack_param_delta = i.InputInt32(instr->InputCount() - 1);
|
| + AssembleDeconstructActivationRecord(stack_param_delta);
|
| __ ldr(ip, FieldMemOperand(func, JSFunction::kCodeEntryOffset));
|
| __ Jump(ip);
|
| DCHECK_EQ(LeaveCC, i.OutputSBit());
|
|
|