5 #ifndef V8_API_ARGUMENTS_H_ 6 #define V8_API_ARGUMENTS_H_ 9 #include "src/debug/debug.h" 10 #include "src/isolate.h" 11 #include "src/objects/slots.h" 12 #include "src/visitors.h" 28 static const int kReturnValueOffset = T::kReturnValueIndex;
32 inline void IterateInstance(
RootVisitor* v)
override {
33 v->VisitRootPointers(Root::kRelocatable,
nullptr, slot_at(0),
34 slot_at(T::kArgsLength));
38 explicit inline CustomArguments(Isolate* isolate)
39 : CustomArgumentsBase(isolate) {}
42 Handle<V> GetReturnValue(Isolate* isolate);
44 inline Isolate* isolate() {
45 return reinterpret_cast<Isolate*
>(*slot_at(T::kIsolateIndex));
48 inline ObjectSlot slot_at(
int index) {
51 DCHECK(index >= 0 && index <= T::kArgsLength);
52 return ObjectSlot(values_ + index);
54 Address values_[T::kArgsLength];
64 static const int kArgsLength = T::kArgsLength;
65 static const int kThisIndex = T::kThisIndex;
66 static const int kHolderIndex = T::kHolderIndex;
67 static const int kDataIndex = T::kDataIndex;
68 static const int kReturnValueDefaultValueIndex =
69 T::kReturnValueDefaultValueIndex;
70 static const int kIsolateIndex = T::kIsolateIndex;
71 static const int kShouldThrowOnErrorIndex = T::kShouldThrowOnErrorIndex;
74 JSObject* holder, ShouldThrow should_throw);
142 inline Object* receiver();
154 static const int kArgsLength = T::kArgsLength;
155 static const int kHolderIndex = T::kHolderIndex;
156 static const int kDataIndex = T::kDataIndex;
157 static const int kReturnValueDefaultValueIndex =
158 T::kReturnValueDefaultValueIndex;
159 static const int kIsolateIndex = T::kIsolateIndex;
160 static const int kNewTargetIndex = T::kNewTargetIndex;
188 #endif // V8_API_ARGUMENTS_H_
void(* IndexedPropertyGetterCallback)(uint32_t index, const PropertyCallbackInfo< Value > &info)
void(* GenericNamedPropertyGetterCallback)(Local< Name > property, const PropertyCallbackInfo< Value > &info)