diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-06-29 17:26:51 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-06-29 17:26:51 +0200 |
commit | 33af2720f26c2b25bc7f75ce7eb454ff99db6d35 (patch) | |
tree | 9a38f0c96420edf503eebd6325dd8d2d8249f653 /deps/v8/src/arguments.h | |
parent | 6afdca885adeeeed9eef8cbb01c3d97af0bc084d (diff) | |
download | node-new-33af2720f26c2b25bc7f75ce7eb454ff99db6d35.tar.gz |
Upgrade V8 to 3.4.8
Diffstat (limited to 'deps/v8/src/arguments.h')
-rw-r--r-- | deps/v8/src/arguments.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/deps/v8/src/arguments.h b/deps/v8/src/arguments.h index 5cf8deaa59..72bbe1dd1f 100644 --- a/deps/v8/src/arguments.h +++ b/deps/v8/src/arguments.h @@ -28,6 +28,8 @@ #ifndef V8_ARGUMENTS_H_ #define V8_ARGUMENTS_H_ +#include "allocation.h" + namespace v8 { namespace internal { @@ -61,11 +63,18 @@ class Arguments BASE_EMBEDDED { return Handle<S>(reinterpret_cast<S**>(value)); } + int smi_at(int index) { + return Smi::cast((*this)[index])->value(); + } + + double number_at(int index) { + return (*this)[index]->Number(); + } + // Get the total number of arguments including the receiver. int length() const { return length_; } Object** arguments() { return arguments_; } - private: int length_; Object** arguments_; @@ -77,15 +86,16 @@ class Arguments BASE_EMBEDDED { // can. class CustomArguments : public Relocatable { public: - inline CustomArguments(Object* data, + inline CustomArguments(Isolate* isolate, + Object* data, Object* self, - JSObject* holder) { + JSObject* holder) : Relocatable(isolate) { values_[2] = self; values_[1] = holder; values_[0] = data; } - inline CustomArguments() { + inline explicit CustomArguments(Isolate* isolate) : Relocatable(isolate) { #ifdef DEBUG for (size_t i = 0; i < ARRAY_SIZE(values_); i++) { values_[i] = reinterpret_cast<Object*>(kZapValue); @@ -100,6 +110,17 @@ class CustomArguments : public Relocatable { }; +#define DECLARE_RUNTIME_FUNCTION(Type, Name) \ +Type Name(Arguments args, Isolate* isolate) + + +#define RUNTIME_FUNCTION(Type, Name) \ +Type Name(Arguments args, Isolate* isolate) + + +#define RUNTIME_ARGUMENTS(isolate, args) args, isolate + + } } // namespace v8::internal #endif // V8_ARGUMENTS_H_ |