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

Unified Diff: src/arguments.h

Issue 242050: Changed structure of accessor arguments passing to allow accessor (Closed)
Patch Set: Tuned Created 11 years, 3 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/api.cc ('k') | src/handles.cc » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « src/api.cc ('k') | src/handles.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698