Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: src/compiler/pipeline.cc

Issue 1696043002: [runtime] Unify and simplify how frames are marked (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge problems Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698