| Index: src/frames.cc
|
| diff --git a/src/frames.cc b/src/frames.cc
|
| index c4a93c87e5089f571671e4fa86c57e7ad40f1ece..98a257000a607e11f8928309c99224af617b6407 100644
|
| --- a/src/frames.cc
|
| +++ b/src/frames.cc
|
| @@ -1081,18 +1081,14 @@ void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) {
|
| }
|
|
|
|
|
| +int OptimizedFrame::StackSlotOffsetRelativeToFp(int slot_index) {
|
| + return StandardFrameConstants::kCallerSPOffset -
|
| + ((slot_index + 1) * kPointerSize);
|
| +}
|
| +
|
| +
|
| Object* OptimizedFrame::StackSlotAt(int index) const {
|
| - // Positive index means the value is spilled to the locals
|
| - // area. Negative means it is stored in the incoming parameter
|
| - // area.
|
| - if (index >= 0) return GetExpression(index);
|
| -
|
| - // Index -1 overlaps with last parameter, -n with the first parameter,
|
| - // (-n - 1) with the receiver with n being the number of parameters
|
| - // of the outermost, optimized frame.
|
| - int const parameter_count = ComputeParametersCount();
|
| - int const parameter_index = index + parameter_count;
|
| - return (parameter_index == -1) ? receiver() : GetParameter(parameter_index);
|
| + return Memory::Object_at(fp() + StackSlotOffsetRelativeToFp(index));
|
| }
|
|
|
|
|
|
|