Index: src/frames.h |
diff --git a/src/frames.h b/src/frames.h |
index d6307f09975db7e0ddc973173e98dbc8a74702ec..2e43385aff997fa852b1f5ed88163c047a9feb97 100644 |
--- a/src/frames.h |
+++ b/src/frames.h |
@@ -463,8 +463,11 @@ class JavaScriptFrame: public StandardFrame { |
inline void set_receiver(Object* value); |
// Access the parameters. |
- Object* GetParameter(int index) const; |
- int ComputeParametersCount() const; |
+ inline Address GetParameterSlot(int index) const; |
+ inline Object* GetParameter(int index) const; |
+ inline int ComputeParametersCount() const { |
+ return GetNumberOfIncomingArguments(); |
+ } |
// Check if this frame is a constructor frame invoked through 'new'. |
bool IsConstructor() const; |
@@ -502,6 +505,8 @@ class JavaScriptFrame: public StandardFrame { |
virtual Address GetCallerStackPointer() const; |
+ virtual int GetNumberOfIncomingArguments() const; |
+ |
// Garbage collection support. Iterates over incoming arguments, |
// receiver, and any callee-saved registers. |
void IterateArguments(ObjectVisitor* v) const; |
@@ -562,6 +567,10 @@ class ArgumentsAdaptorFrame: public JavaScriptFrame { |
explicit ArgumentsAdaptorFrame(StackFrameIterator* iterator) |
: JavaScriptFrame(iterator) { } |
+ virtual int GetNumberOfIncomingArguments() const { |
+ return Smi::cast(GetExpression(0))->value(); |
fschneider
2011/04/06 14:06:55
Too much indentation.
|
+ } |
+ |
virtual Address GetCallerStackPointer() const; |
private: |