| Index: src/compiler/ia32/code-generator-ia32.cc
|
| diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc
|
| index 5ca9c203969bada5cfc9dfc6c55d03b06b303830..ffdeae7a4198bd9f4c7b181c4fb1e440dee78ecc 100644
|
| --- a/src/compiler/ia32/code-generator-ia32.cc
|
| +++ b/src/compiler/ia32/code-generator-ia32.cc
|
| @@ -326,13 +326,20 @@ class OutOfLineRecordWrite final : public OutOfLineCode {
|
| } while (false)
|
|
|
|
|
| -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(esp, ebp);
|
| __ pop(ebp);
|
| }
|
| + if (stack_param_delta < 0) {
|
| + int offset = -(stack_param_delta + 1) * kPointerSize;
|
| + __ pop(Operand(esp, offset));
|
| + if (offset != 0) {
|
| + __ add(esp, Immediate(offset));
|
| + }
|
| + }
|
| }
|
|
|
|
|
| @@ -355,7 +362,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| break;
|
| }
|
| case kArchTailCallCodeObject: {
|
| - AssembleDeconstructActivationRecord();
|
| + int stack_param_delta = i.InputInt32(instr->InputCount() - 1);
|
| + AssembleDeconstructActivationRecord(stack_param_delta);
|
| if (HasImmediateInput(instr, 0)) {
|
| Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0));
|
| __ jmp(code, RelocInfo::CODE_TARGET);
|
| @@ -385,7 +393,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
|
| __ cmp(esi, FieldOperand(func, JSFunction::kContextOffset));
|
| __ Assert(equal, kWrongFunctionContext);
|
| }
|
| - AssembleDeconstructActivationRecord();
|
| + int stack_param_delta = i.InputInt32(instr->InputCount() - 1);
|
| + AssembleDeconstructActivationRecord(stack_param_delta);
|
| __ jmp(FieldOperand(func, JSFunction::kCodeEntryOffset));
|
| break;
|
| }
|
|
|