Index: src/compiler/x64/code-generator-x64.cc |
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc |
index 8bd9e89b0525a893812aa69659288dbd1f4eb6a5..841606a4a463bfb1b08f1c749fe01cf10900eb74 100644 |
--- a/src/compiler/x64/code-generator-x64.cc |
+++ b/src/compiler/x64/code-generator-x64.cc |
@@ -2397,6 +2397,9 @@ void CodeGenerator::AssembleConstructFrame() { |
__ movq(rbp, rsp); |
} else if (descriptor->IsJSFunctionCall()) { |
__ Prologue(this->info()->GeneratePreagedPrologue()); |
+ if (descriptor->PushArgumentCount()) { |
+ __ pushq(kJavaScriptCallArgCountRegister); |
+ } |
} else { |
__ StubPrologue(info()->GetOutputStackFrameType()); |
} |
@@ -2405,7 +2408,8 @@ void CodeGenerator::AssembleConstructFrame() { |
unwinding_info_writer_.MarkFrameConstructed(pc_base); |
} |
} |
- int shrink_slots = frame()->GetSpillSlotCount(); |
+ int shrink_slots = |
+ frame()->GetTotalFrameSlotCount() - descriptor->CalculateFixedFrameSize(); |
if (info()->is_osr()) { |
// TurboFan OSR-compiled functions cannot be entered directly. |