| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_ARGUMENTS_H_ | 5 #ifndef V8_ARGUMENTS_H_ |
| 6 #define V8_ARGUMENTS_H_ | 6 #define V8_ARGUMENTS_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 private: | 61 private: |
| 62 intptr_t length_; | 62 intptr_t length_; |
| 63 Object** arguments_; | 63 Object** arguments_; |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 | 66 |
| 67 // For each type of callback, we have a list of arguments | 67 // For each type of callback, we have a list of arguments |
| 68 // They are used to generate the Call() functions below | 68 // They are used to generate the Call() functions below |
| 69 // These aren't included in the list as they have duplicate signatures | 69 // These aren't included in the list as they have duplicate signatures |
| 70 // F(NamedPropertyEnumeratorCallback, ...) | 70 // F(NamedPropertyEnumeratorCallback, ...) |
| 71 // F(NamedPropertyGetterCallback, ...) | |
| 72 | 71 |
| 73 #define FOR_EACH_CALLBACK_TABLE_MAPPING_0(F) \ | 72 #define FOR_EACH_CALLBACK_TABLE_MAPPING_0(F) \ |
| 74 F(IndexedPropertyEnumeratorCallback, v8::Array) \ | 73 F(IndexedPropertyEnumeratorCallback, v8::Array) \ |
| 75 | 74 |
| 76 #define FOR_EACH_CALLBACK_TABLE_MAPPING_1(F) \ | 75 #define FOR_EACH_CALLBACK_TABLE_MAPPING_1(F) \ |
| 77 F(AccessorGetterCallback, v8::Value, v8::Local<v8::String>) \ | 76 F(NamedPropertyGetterCallback, v8::Value, v8::Local<v8::String>) \ |
| 77 F(AccessorNameGetterCallback, v8::Value, v8::Local<v8::Name>) \ |
| 78 F(NamedPropertyQueryCallback, \ | 78 F(NamedPropertyQueryCallback, \ |
| 79 v8::Integer, \ | 79 v8::Integer, \ |
| 80 v8::Local<v8::String>) \ | 80 v8::Local<v8::String>) \ |
| 81 F(NamedPropertyDeleterCallback, \ | 81 F(NamedPropertyDeleterCallback, \ |
| 82 v8::Boolean, \ | 82 v8::Boolean, \ |
| 83 v8::Local<v8::String>) \ | 83 v8::Local<v8::String>) \ |
| 84 F(IndexedPropertyGetterCallback, \ | 84 F(IndexedPropertyGetterCallback, \ |
| 85 v8::Value, \ | 85 v8::Value, \ |
| 86 uint32_t) \ | 86 uint32_t) \ |
| 87 F(IndexedPropertyQueryCallback, \ | 87 F(IndexedPropertyQueryCallback, \ |
| 88 v8::Integer, \ | 88 v8::Integer, \ |
| 89 uint32_t) \ | 89 uint32_t) \ |
| 90 F(IndexedPropertyDeleterCallback, \ | 90 F(IndexedPropertyDeleterCallback, \ |
| 91 v8::Boolean, \ | 91 v8::Boolean, \ |
| 92 uint32_t) \ | 92 uint32_t) \ |
| 93 | 93 |
| 94 #define FOR_EACH_CALLBACK_TABLE_MAPPING_2(F) \ | 94 #define FOR_EACH_CALLBACK_TABLE_MAPPING_2(F) \ |
| 95 F(NamedPropertySetterCallback, \ | 95 F(NamedPropertySetterCallback, \ |
| 96 v8::Value, \ | 96 v8::Value, \ |
| 97 v8::Local<v8::String>, \ | 97 v8::Local<v8::String>, \ |
| 98 v8::Local<v8::Value>) \ | 98 v8::Local<v8::Value>) \ |
| 99 F(IndexedPropertySetterCallback, \ | 99 F(IndexedPropertySetterCallback, \ |
| 100 v8::Value, \ | 100 v8::Value, \ |
| 101 uint32_t, \ | 101 uint32_t, \ |
| 102 v8::Local<v8::Value>) \ | 102 v8::Local<v8::Value>) \ |
| 103 | 103 |
| 104 #define FOR_EACH_CALLBACK_TABLE_MAPPING_2_VOID_RETURN(F) \ | 104 #define FOR_EACH_CALLBACK_TABLE_MAPPING_2_VOID_RETURN(F) \ |
| 105 F(AccessorSetterCallback, \ | 105 F(AccessorNameSetterCallback, \ |
| 106 void, \ | 106 void, \ |
| 107 v8::Local<v8::String>, \ | 107 v8::Local<v8::Name>, \ |
| 108 v8::Local<v8::Value>) \ | 108 v8::Local<v8::Value>) \ |
| 109 | 109 |
| 110 | 110 |
| 111 // Custom arguments replicate a small segment of stack that can be | 111 // Custom arguments replicate a small segment of stack that can be |
| 112 // accessed through an Arguments object the same way the actual stack | 112 // accessed through an Arguments object the same way the actual stack |
| 113 // can. | 113 // can. |
| 114 template<int kArrayLength> | 114 template<int kArrayLength> |
| 115 class CustomArgumentsBase : public Relocatable { | 115 class CustomArgumentsBase : public Relocatable { |
| 116 public: | 116 public: |
| 117 virtual inline void IterateInstance(ObjectVisitor* v) { | 117 virtual inline void IterateInstance(ObjectVisitor* v) { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 #define RUNTIME_FUNCTION(Name) RUNTIME_FUNCTION_RETURNS_TYPE(Object*, Name) | 296 #define RUNTIME_FUNCTION(Name) RUNTIME_FUNCTION_RETURNS_TYPE(Object*, Name) |
| 297 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \ | 297 #define RUNTIME_FUNCTION_RETURN_PAIR(Name) \ |
| 298 RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name) | 298 RUNTIME_FUNCTION_RETURNS_TYPE(ObjectPair, Name) |
| 299 | 299 |
| 300 #define RUNTIME_ARGUMENTS(isolate, args) \ | 300 #define RUNTIME_ARGUMENTS(isolate, args) \ |
| 301 args.length(), args.arguments(), isolate | 301 args.length(), args.arguments(), isolate |
| 302 | 302 |
| 303 } } // namespace v8::internal | 303 } } // namespace v8::internal |
| 304 | 304 |
| 305 #endif // V8_ARGUMENTS_H_ | 305 #endif // V8_ARGUMENTS_H_ |
| OLD | NEW |