Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index bb185c3fd5972fd25170d935ca97e64f1e51614b..50846d6e81f6c03c69fa4e2b40c33f8e0b93a96e 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -280,10 +280,7 @@ class PipelineData { |
DCHECK(frame_ == nullptr); |
int fixed_frame_size = 0; |
if (descriptor != nullptr) { |
- fixed_frame_size = (descriptor->IsCFunctionCall()) |
- ? StandardFrameConstants::kFixedSlotCountAboveFp + |
- StandardFrameConstants::kCPSlotCount |
- : StandardFrameConstants::kFixedSlotCount; |
+ fixed_frame_size = CalculateFixedFrameSize(descriptor); |
} |
frame_ = new (instruction_zone()) Frame(fixed_frame_size, descriptor); |
} |
@@ -338,6 +335,16 @@ class PipelineData { |
Zone* register_allocation_zone_; |
RegisterAllocationData* register_allocation_data_; |
+ int CalculateFixedFrameSize(CallDescriptor* descriptor) { |
+ if (descriptor->IsJSFunctionCall()) { |
+ return StandardFrameConstants::kFixedSlotCount; |
+ } |
+ return descriptor->IsCFunctionCall() |
+ ? (CommonFrameConstants::kFixedSlotCountAboveFp + |
+ CommonFrameConstants::kCPSlotCount) |
+ : TypedFrameConstants::kFixedSlotCount; |
+ } |
+ |
DISALLOW_COPY_AND_ASSIGN(PipelineData); |
}; |