Index: src/arguments.h |
diff --git a/src/arguments.h b/src/arguments.h |
index 80f90063ba05abcea747f24fd2363c8c93c00999..fbd82128c245e580b666b97c447d5f73fd6ab8b0 100644 |
--- a/src/arguments.h |
+++ b/src/arguments.h |
@@ -45,6 +45,9 @@ namespace internal { |
class Arguments BASE_EMBEDDED { |
public: |
+ Arguments(int length, Object** arguments) |
+ : length_(length), arguments_(arguments) { } |
+ |
Object*& operator[] (int index) { |
ASSERT(0 <= index && index < length_); |
return arguments_[-index]; |
@@ -60,12 +63,35 @@ class Arguments BASE_EMBEDDED { |
// Get the total number of arguments including the receiver. |
int length() const { return length_; } |
+ |
iposva
2009/09/30 22:19:05
Presubmit Check: Fail
|
+ Object** arguments() { return arguments_; } |
private: |
int length_; |
Object** arguments_; |
}; |
+ |
+// Cursom arguments replicate a small segment of stack that can be |
iposva
2009/09/30 22:19:05
Cursom -> Custom
|
+// accessed through an Arguments object the same way the actual stack |
+// can. |
+class CustomArguments : public Relocatable { |
+public: |
iposva
2009/09/30 22:19:05
Presubmit Check: Fail
|
+ inline CustomArguments(Object *data, |
+ JSObject *self, |
+ JSObject *holder) { |
+ values_[3] = self; |
+ values_[2] = holder; |
+ values_[1] = Smi::FromInt(0); |
+ values_[0] = data; |
+ } |
+ void IterateInstance(ObjectVisitor* v); |
+ Object** end() { return values_ + 3; } |
+private: |
iposva
2009/09/30 22:19:05
Presubmit Check: Fail
|
+ Object* values_[4]; |
+}; |
+ |
+ |
} } // namespace v8::internal |
#endif // V8_ARGUMENTS_H_ |