5 #ifndef V8_ACCESSORS_H_ 6 #define V8_ACCESSORS_H_ 8 #include "include/v8.h" 9 #include "src/allocation.h" 10 #include "src/globals.h" 11 #include "src/property-details.h" 26 #define ACCESSOR_INFO_LIST_GENERATOR(V, _) \ 27 V(_, arguments_iterator, ArgumentsIterator, kHasNoSideEffect, \ 28 kHasSideEffectToReceiver) \ 29 V(_, array_length, ArrayLength, kHasNoSideEffect, kHasSideEffectToReceiver) \ 30 V(_, bound_function_length, BoundFunctionLength, kHasNoSideEffect, \ 31 kHasSideEffectToReceiver) \ 32 V(_, bound_function_name, BoundFunctionName, kHasNoSideEffect, \ 33 kHasSideEffectToReceiver) \ 34 V(_, error_stack, ErrorStack, kHasSideEffectToReceiver, \ 35 kHasSideEffectToReceiver) \ 36 V(_, function_arguments, FunctionArguments, kHasNoSideEffect, \ 37 kHasSideEffectToReceiver) \ 38 V(_, function_caller, FunctionCaller, kHasNoSideEffect, \ 39 kHasSideEffectToReceiver) \ 40 V(_, function_name, FunctionName, kHasNoSideEffect, \ 41 kHasSideEffectToReceiver) \ 42 V(_, function_length, FunctionLength, kHasNoSideEffect, \ 43 kHasSideEffectToReceiver) \ 44 V(_, function_prototype, FunctionPrototype, kHasNoSideEffect, \ 45 kHasSideEffectToReceiver) \ 46 V(_, string_length, StringLength, kHasNoSideEffect, kHasSideEffectToReceiver) 48 #define ACCESSOR_SETTER_LIST(V) \ 49 V(ArrayLengthSetter) \ 51 V(FunctionPrototypeSetter) \ 52 V(ModuleNamespaceEntrySetter) \ 53 V(ReconfigureToDataProperty) 59 #define ACCESSOR_GETTER_DECLARATION(_, accessor_name, AccessorName, ...) \ 60 static void AccessorName##Getter( \ 61 v8::Local<v8::Name> name, \ 62 const v8::PropertyCallbackInfo<v8::Value>& info); 63 ACCESSOR_INFO_LIST_GENERATOR(ACCESSOR_GETTER_DECLARATION, )
64 #undef ACCESSOR_GETTER_DECLARATION 66 #define ACCESSOR_SETTER_DECLARATION(accessor_name) \ 67 static void accessor_name( \ 68 v8::Local<v8::Name> name, v8::Local<v8::Value> value, \ 69 const v8::PropertyCallbackInfo<v8::Boolean>& info); 70 ACCESSOR_SETTER_LIST(ACCESSOR_SETTER_DECLARATION)
71 #undef ACCESSOR_SETTER_DECLARATION 73 static constexpr
int kAccessorInfoCount =
74 #define COUNT_ACCESSOR(...) +1 75 ACCESSOR_INFO_LIST_GENERATOR(COUNT_ACCESSOR, );
78 static constexpr
int kAccessorSetterCount =
79 #define COUNT_ACCESSOR(...) +1 80 ACCESSOR_SETTER_LIST(COUNT_ACCESSOR);
83 static void ModuleNamespaceEntryGetter(
93 int inlined_jsframe_index);
113 typedef void (*AccessorNameBooleanSetterCallback)(
119 AccessorNameBooleanSetterCallback setter);
122 #define ACCESSOR_INFO_DECLARATION(_, accessor_name, AccessorName, ...) \ 123 static Handle<AccessorInfo> Make##AccessorName##Info(Isolate* isolate); 124 ACCESSOR_INFO_LIST_GENERATOR(ACCESSOR_INFO_DECLARATION, )
125 #undef ACCESSOR_INFO_DECLARATION 133 #endif // V8_ACCESSORS_H_