Index: src/frames-inl.h |
=================================================================== |
--- src/frames-inl.h (revision 7504) |
+++ src/frames-inl.h (working copy) |
@@ -148,26 +148,15 @@ |
} |
-Address JavaScriptFrame::GetParameterSlot(int index) const { |
- int param_count = ComputeParametersCount(); |
- ASSERT(-1 <= index && index < param_count); |
- int parameter_offset = (param_count - index - 1) * kPointerSize; |
- return caller_sp() + parameter_offset; |
-} |
- |
- |
-Object* JavaScriptFrame::GetParameter(int index) const { |
- return Memory::Object_at(GetParameterSlot(index)); |
-} |
- |
- |
inline Object* JavaScriptFrame::receiver() const { |
- return GetParameter(-1); |
+ const int offset = JavaScriptFrameConstants::kReceiverOffset; |
+ return Memory::Object_at(caller_sp() + offset); |
} |
inline void JavaScriptFrame::set_receiver(Object* value) { |
- Memory::Object_at(GetParameterSlot(-1)) = value; |
+ const int offset = JavaScriptFrameConstants::kReceiverOffset; |
+ Memory::Object_at(caller_sp() + offset) = value; |
} |