Index: src/compiler/linkage.cc |
diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc |
index cc67fe5007988b3b1368aa0c798996100c116cc3..61aad5d9d2351795150f596bb97529f77945d85f 100644 |
--- a/src/compiler/linkage.cc |
+++ b/src/compiler/linkage.cc |
@@ -6,6 +6,7 @@ |
#include "src/compiler.h" |
#include "src/compiler/common-operator.h" |
#include "src/compiler/frame.h" |
+#include "src/compiler/frame-access-state.h" |
#include "src/compiler/linkage.h" |
#include "src/compiler/node.h" |
#include "src/compiler/osr.h" |
@@ -147,19 +148,20 @@ CallDescriptor* Linkage::ComputeIncoming(Zone* zone, CompilationInfo* info) { |
} |
-FrameOffset Linkage::GetFrameOffset(int spill_slot, Frame* frame) const { |
- bool has_frame = frame->GetSpillSlotCount() > 0 || |
- incoming_->IsJSFunctionCall() || |
- incoming_->kind() == CallDescriptor::kCallAddress; |
+FrameOffset Linkage::GetFrameOffset( |
titzer
2015/11/23 20:00:54
Now that I think about this method in modern times
danno
2015/11/24 12:02:00
Done.
|
+ int spill_slot, FrameAccessState* frame_access_state) const { |
const int offset = |
(StandardFrameConstants::kFixedSlotCountAboveFp - spill_slot - 1) * |
kPointerSize; |
- if (has_frame) { |
+ if (frame_access_state->access_frame_with_fp()) { |
+ DCHECK(frame_access_state->frame()->needs_frame()); |
return FrameOffset::FromFramePointer(offset); |
} else { |
// No frame. Retrieve all parameters relative to stack pointer. |
- DCHECK(spill_slot < 0); // Must be a parameter. |
- int sp_offset = offset + (frame->GetSpToFpSlotCount() * kPointerSize); |
+ int sp_offset = |
+ offset + ((frame_access_state->frame()->GetSpToFpSlotCount() + |
+ frame_access_state->sp_delta()) * |
+ kPointerSize); |
return FrameOffset::FromStackPointer(sp_offset); |
} |
} |