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

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: 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/frame.h
diff --git a/src/compiler/frame.h b/src/compiler/frame.h
index 4c4c2409b46271e9ce9e605c862c77942487a3c9..4eae7b1a6558f12484ad6ac21308e4ee3b191b01 100644
--- a/src/compiler/frame.h
+++ b/src/compiler/frame.h
@@ -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

Powered by Google App Engine
This is Rietveld 408576698