| Index: src/compiler/arm64/code-generator-arm64.cc
|
| diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc
|
| index c6136a09db8bd9ae0e7ff1836dd5bd0af8918c5f..47df78565688f1a8d33183231bf5cce0c2b401a4 100644
|
| --- a/src/compiler/arm64/code-generator-arm64.cc
|
| +++ b/src/compiler/arm64/code-generator-arm64.cc
|
| @@ -448,13 +448,17 @@ 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) {
|
| __ Mov(jssp, fp);
|
| __ Pop(fp, lr);
|
| }
|
| + if (stack_param_delta < 0) {
|
| + int offset = -stack_param_delta * kPointerSize;
|
| + __ Add(jssp, jssp, Operand(offset));
|
| + }
|
| }
|
|
|
|
|
| @@ -477,7 +481,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);
|
| @@ -514,7 +519,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| __ cmp(cp, temp);
|
| __ Assert(eq, kWrongFunctionContext);
|
| }
|
| - AssembleDeconstructActivationRecord();
|
| + int stack_param_delta = i.InputInt32(instr->InputCount() - 1);
|
| + AssembleDeconstructActivationRecord(stack_param_delta);
|
| __ Ldr(x10, FieldMemOperand(func, JSFunction::kCodeEntryOffset));
|
| __ Jump(x10);
|
| break;
|
|
|