chromium/v8/include/v8-function-callback.h

// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef INCLUDE_V8_FUNCTION_CALLBACK_H_
#define INCLUDE_V8_FUNCTION_CALLBACK_H_

#include <cstdint>
#include <limits>

#include "v8-internal.h"      // NOLINT(build/include_directory)
#include "v8-local-handle.h"  // NOLINT(build/include_directory)
#include "v8-primitive.h"     // NOLINT(build/include_directory)
#include "v8config.h"         // NOLINT(build/include_directory)

namespace v8 {

template <typename T>
class BasicTracedReference;
template <typename T>
class Global;
class Object;
class Value;

namespace internal {
class FunctionCallbackArguments;
class PropertyCallbackArguments;
class Builtins;
}  // namespace internal

namespace debug {
class ConsoleCallArguments;
}  // namespace debug

namespace api_internal {
V8_EXPORT v8::Local<v8::Value> GetFunctionTemplateData(
    v8::Isolate* isolate, v8::Local<v8::Data> raw_target);
}  // namespace api_internal

template <typename T>
class ReturnValue {};

/**
 * The argument information given to function call callbacks.  This
 * class provides access to information about the context of the call,
 * including the receiver, the number and values of arguments, and
 * the holder of the function.
 */
template <typename T>
class FunctionCallbackInfo {};

/**
 * The information passed to a property callback about the context
 * of the property access.
 */
template <typename T>
class PropertyCallbackInfo {};

FunctionCallback;

// --- Implementation ---

template <typename T>
ReturnValue<T>::ReturnValue(internal::Address* slot) :{}

template <typename T>
void ReturnValue<T>::SetInternal(internal::Address value) {}

template <typename T>
template <typename S>
void ReturnValue<T>::Set(const Global<S>& handle) {}

template <typename T>
template <typename S>
void ReturnValue<T>::SetNonEmpty(const Global<S>& handle) {}

template <typename T>
template <typename S>
void ReturnValue<T>::Set(const BasicTracedReference<S>& handle) {}

template <typename T>
template <typename S>
void ReturnValue<T>::SetNonEmpty(const BasicTracedReference<S>& handle) {}

template <typename T>
template <typename S>
void ReturnValue<T>::Set(const Local<S> handle) {}

template <typename T>
template <typename S>
void ReturnValue<T>::SetNonEmpty(const Local<S> handle) {}

template <typename T>
void ReturnValue<T>::Set(double i) {}

template <typename T>
void ReturnValue<T>::Set(int16_t i) {}

template <typename T>
void ReturnValue<T>::Set(int32_t i) {}

template <typename T>
void ReturnValue<T>::Set(int64_t i) {}

template <typename T>
void ReturnValue<T>::Set(uint16_t i) {}

template <typename T>
void ReturnValue<T>::Set(uint32_t i) {}

template <typename T>
void ReturnValue<T>::Set(uint64_t i) {}

template <typename T>
void ReturnValue<T>::Set(bool value) {}

template <typename T>
void ReturnValue<T>::SetDefaultValue() {}

template <typename T>
void ReturnValue<T>::SetNull() {}

template <typename T>
void ReturnValue<T>::SetUndefined() {}

template <typename T>
void ReturnValue<T>::SetFalse() {}

template <typename T>
void ReturnValue<T>::SetEmptyString() {}

template <typename T>
Isolate* ReturnValue<T>::GetIsolate() const {}

template <typename T>
Local<Value> ReturnValue<T>::Get() const {}

template <typename T>
template <typename S>
void ReturnValue<T>::Set(S* whatever) {}

template <typename T>
FunctionCallbackInfo<T>::FunctionCallbackInfo(internal::Address* implicit_args,
                                              internal::Address* values,
                                              int length)
    :{}

template <typename T>
Local<Value> FunctionCallbackInfo<T>::operator[](int i) const {}

template <typename T>
Local<Object> FunctionCallbackInfo<T>::This() const {}

template <typename T>
Local<Object> FunctionCallbackInfo<T>::HolderSoonToBeDeprecated() const {}

template <typename T>
Local<Object> FunctionCallbackInfo<T>::Holder() const {}

template <typename T>
Local<Value> FunctionCallbackInfo<T>::NewTarget() const {}

template <typename T>
Local<Value> FunctionCallbackInfo<T>::Data() const {}

template <typename T>
Isolate* FunctionCallbackInfo<T>::GetIsolate() const {}

template <typename T>
ReturnValue<T> FunctionCallbackInfo<T>::GetReturnValue() const {}

template <typename T>
bool FunctionCallbackInfo<T>::IsConstructCall() const {}

template <typename T>
int FunctionCallbackInfo<T>::Length() const {}

template <typename T>
Isolate* PropertyCallbackInfo<T>::GetIsolate() const {}

template <typename T>
Local<Value> PropertyCallbackInfo<T>::Data() const {}

template <typename T>
Local<Object> PropertyCallbackInfo<T>::This() const {}

template <typename T>
Local<Object> PropertyCallbackInfo<T>::Holder() const {}

namespace api_internal {
// Returns JSGlobalProxy if holder is JSGlobalObject or unmodified holder
// otherwise.
V8_EXPORT internal::Address ConvertToJSGlobalProxyIfNecessary(
    internal::Address holder);
}  // namespace api_internal

template <typename T>
Local<Object> PropertyCallbackInfo<T>::HolderV2() const {}

template <typename T>
ReturnValue<T> PropertyCallbackInfo<T>::GetReturnValue() const {}

template <typename T>
bool PropertyCallbackInfo<T>::ShouldThrowOnError() const {}

}  // namespace v8

#endif  // INCLUDE_V8_FUNCTION_CALLBACK_H_