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

Unified Diff: src/compiler/frame.cc

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/frame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/frame.cc
diff --git a/src/compiler/frame.cc b/src/compiler/frame.cc
index fd080c8def8ffed2f7cbeaecc78d6fbbf70c9e05..ace0f7c8b3f59190fe35c47c3cd67545c3376f05 100644
--- a/src/compiler/frame.cc
+++ b/src/compiler/frame.cc
@@ -44,16 +44,13 @@ void FrameAccessState::SetFrameAccessToDefault() {
FrameOffset FrameAccessState::GetFrameOffset(int spill_slot) const {
- const int offset =
- (StandardFrameConstants::kFixedSlotCountAboveFp - spill_slot - 1) *
- kPointerSize;
+ const int frame_offset = FrameSlotToFPOffset(spill_slot);
if (access_frame_with_fp()) {
DCHECK(frame()->needs_frame());
- return FrameOffset::FromFramePointer(offset);
+ return FrameOffset::FromFramePointer(frame_offset);
} else {
// No frame. Retrieve all parameters relative to stack pointer.
- int sp_offset =
- offset + ((frame()->GetSpToFpSlotCount() + sp_delta()) * kPointerSize);
+ int sp_offset = frame_offset + GetSPToFPOffset();
return FrameOffset::FromStackPointer(sp_offset);
}
}
« no previous file with comments | « src/compiler/frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698