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

Unified Diff: src/compiler/frame.h

Issue 1777013004: Small cleanup refactoring of sp-to-fp offset and slot conversions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback 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
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/frame.h
diff --git a/src/compiler/frame.h b/src/compiler/frame.h
index 4c4c2409b46271e9ce9e605c862c77942487a3c9..77dccaa629cc0c36e2cb604dc5e3ebf3e7065055 100644
--- a/src/compiler/frame.h
+++ b/src/compiler/frame.h
@@ -86,7 +86,7 @@ class Frame : public ZoneObject {
inline int GetTotalFrameSlotCount() const { return frame_slot_count_; }
- inline int GetSpToFpSlotCount() const {
+ inline int GetSPToFPSlotCount() const {
return GetTotalFrameSlotCount() -
StandardFrameConstants::kFixedSlotCountAboveFp;
}
@@ -225,6 +225,11 @@ class FrameAccessState : public ZoneObject {
void SetFrameAccessToFP() { access_frame_with_fp_ = true; }
void SetFrameAccessToSP() { access_frame_with_fp_ = false; }
+ int GetSPToFPSlotCount() const {
+ return frame_->GetSPToFPSlotCount() + sp_delta();
+ }
+ int GetSPToFPOffset() const { return GetSPToFPSlotCount() * kPointerSize; }
+
// Get the frame offset for a given spill slot. The location depends on the
// calling convention and the specific frame layout, and may thus be
// architecture-specific. Negative spill slots indicate arguments on the
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698