| Index: src/compiler/linkage.cc
|
| diff --git a/src/compiler/linkage.cc b/src/compiler/linkage.cc
|
| index cb9aeec085dd369f00ff68de914d2b744e8f25ba..60290b95c5e52502ad112f5e76cf758e3b33acf4 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(
|
| + 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);
|
| }
|
| }
|
|
|