Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Unified Diff: src/frames-inl.h

Issue 6677160: Revert r7504.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/frames.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/frames.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698