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); |
} |
} |