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

Side by Side Diff: src/compiler/frame.h

Issue 2124983004: [Turbofan] Change AlignSavedCalleeRegisterSlots to AlignFrame. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_FRAME_H_ 5 #ifndef V8_COMPILER_FRAME_H_
6 #define V8_COMPILER_FRAME_H_ 6 #define V8_COMPILER_FRAME_H_
7 7
8 #include "src/bit-vector.h" 8 #include "src/bit-vector.h"
9 #include "src/frames.h" 9 #include "src/frames.h"
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 void SetAllocatedDoubleRegisters(BitVector* regs) { 92 void SetAllocatedDoubleRegisters(BitVector* regs) {
93 DCHECK(allocated_double_registers_ == nullptr); 93 DCHECK(allocated_double_registers_ == nullptr);
94 allocated_double_registers_ = regs; 94 allocated_double_registers_ = regs;
95 } 95 }
96 96
97 bool DidAllocateDoubleRegisters() const { 97 bool DidAllocateDoubleRegisters() const {
98 return !allocated_double_registers_->IsEmpty(); 98 return !allocated_double_registers_->IsEmpty();
99 } 99 }
100 100
101 void AlignSavedCalleeRegisterSlots(int alignment = kDoubleSize) {
102 int alignment_slots = alignment / kPointerSize;
103 int delta = alignment_slots - (frame_slot_count_ & (alignment_slots - 1));
104 if (delta != alignment_slots) {
105 frame_slot_count_ += delta;
106 }
107 spill_slot_count_ += delta;
108 }
109
110 void AllocateSavedCalleeRegisterSlots(int count) { 101 void AllocateSavedCalleeRegisterSlots(int count) {
111 frame_slot_count_ += count; 102 frame_slot_count_ += count;
112 } 103 }
113 104
114 int AllocateSpillSlot(int width) { 105 int AllocateSpillSlot(int width) {
115 int frame_slot_count_before = frame_slot_count_; 106 int frame_slot_count_before = frame_slot_count_;
116 int slot = AllocateAlignedFrameSlot(width); 107 int slot = AllocateAlignedFrameSlot(width);
117 spill_slot_count_ += (frame_slot_count_ - frame_slot_count_before); 108 spill_slot_count_ += (frame_slot_count_ - frame_slot_count_before);
118 return slot; 109 return slot;
119 } 110 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 const Frame* const frame_; 214 const Frame* const frame_;
224 bool access_frame_with_fp_; 215 bool access_frame_with_fp_;
225 int sp_delta_; 216 int sp_delta_;
226 bool has_frame_; 217 bool has_frame_;
227 }; 218 };
228 } // namespace compiler 219 } // namespace compiler
229 } // namespace internal 220 } // namespace internal
230 } // namespace v8 221 } // namespace v8
231 222
232 #endif // V8_COMPILER_FRAME_H_ 223 #endif // V8_COMPILER_FRAME_H_
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698