v8  10.1.124 (node 18.2.0)
V8 is Google's open source JavaScript engine
v8-fast-api-calls.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <tuple>
#include <type_traits>
#include "v8-internal.h"
#include "v8-local-handle.h"
#include "v8-typed-array.h"
#include "v8-value.h"
#include "v8config.h"
Include dependency graph for v8-fast-api-calls.h:

Go to the source code of this file.

Data Structures

class  CTypeInfo
 
struct  FastApiTypedArrayBase
 
struct  FastApiTypedArray< T >
 
struct  FastApiArrayBufferView
 
struct  FastApiArrayBuffer
 
class  CFunctionInfo
 
struct  AnyCType
 
class  CFunction
 
struct  FastApiCallbackOptions
 
struct  count< T, List >
 
struct  count< T, T, Args... >
 
struct  count< T, U, Args... >
 
class  CFunctionInfoImpl< RetBuilder, ArgBuilders >
 
struct  TypeInfoHelper< T >
 
struct  CTypeInfoTraits< type >
 
struct  TypeInfoHelper< v8::Local< v8::Array > >
 
struct  TypeInfoHelper< v8::Local< v8::Uint32Array > >
 
struct  TypeInfoHelper< FastApiCallbackOptions & >
 
class  CTypeInfoBuilder< T, Flags >
 
class  CFunctionBuilderWithFunction< RetBuilder, ArgBuilders >
 
class  CFunctionBuilder
 

Namespaces

 v8
 
 v8::internal
 

Macros

#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR(T, Enum)
 
#define DEFINE_TYPE_INFO_TRAITS(CType, Enum)
 
#define PRIMITIVE_C_TYPES(V)
 
#define ALL_C_TYPES(V)
 
#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR_TA(T, Enum)
 
#define TYPED_ARRAY_C_TYPES(V)
 
#define STATIC_ASSERT_IMPLIES(COND, ASSERTION, MSG)    static_assert(((COND) == 0) || (ASSERTION), MSG)
 

Typedefs

using CFunctionBuilder = internal::CFunctionBuilder
 

Functions

template<const CTypeInfo * type_info, typename T >
 V8_DEPRECATED ("Use TryToCopyAndConvertArrayToCppBuffer<CTypeInfo::Identifier, T>()") bool V8_EXPORT V8_WARN_UNUSED_RESULT TryCopyAndConvertArrayToCppBuffer(Local< Array > src
 
template<>
 V8_DEPRECATED ("Use TryToCopyAndConvertArrayToCppBuffer<CTypeInfo::Identifier, T>()") inline bool V8_WARN_UNUSED_RESULT TryCopyAndConvertArrayToCppBuffer< &kTypeInfoInt32
 
 int32_t (Local< Array > src, int32_t *dst, uint32_t max_length)
 
 double (Local< Array > src, double *dst, uint32_t max_length)
 
template<CTypeInfo::Identifier type_info_id, typename T >
bool V8_EXPORT V8_WARN_UNUSED_RESULT TryToCopyAndConvertArrayToCppBuffer (Local< Array > src, T *dst, uint32_t max_length)
 

Variables

T * dst
 
T uint32_t max_length
 

Macro Definition Documentation

◆ ALL_C_TYPES

#define ALL_C_TYPES (   V)
Value:
V(void, kVoid) \
V(v8::Local<v8::Value>, kV8Value) \
V(v8::Local<v8::Object>, kV8Value) \
V(AnyCType, kAny)
#define PRIMITIVE_C_TYPES(V)
#define V(Name)

Definition at line 654 of file v8-fast-api-calls.h.

◆ DEFINE_TYPE_INFO_TRAITS

#define DEFINE_TYPE_INFO_TRAITS (   CType,
  Enum 
)
Value:
template <> \
struct CTypeInfoTraits<CTypeInfo::Type::Enum> { \
using ctype = CType; \
};

Definition at line 638 of file v8-fast-api-calls.h.

◆ PRIMITIVE_C_TYPES

#define PRIMITIVE_C_TYPES (   V)
Value:
V(bool, kBool) \
V(int32_t, kInt32) \
V(uint32_t, kUint32) \
V(int64_t, kInt64) \
V(uint64_t, kUint64) \
V(float, kFloat32) \
V(double, kFloat64)
int32_t(Local< Array > src, int32_t *dst, uint32_t max_length)

Definition at line 644 of file v8-fast-api-calls.h.

◆ SPECIALIZE_GET_TYPE_INFO_HELPER_FOR

#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR (   T,
  Enum 
)
Value:
template <> \
struct TypeInfoHelper<T> { \
static constexpr CTypeInfo::Flags Flags() { \
return CTypeInfo::Flags::kNone; \
} \
\
static constexpr CTypeInfo::Type Type() { return CTypeInfo::Type::Enum; } \
static constexpr CTypeInfo::SequenceType SequenceType() { \
return CTypeInfo::SequenceType::kScalar; \
} \
};

Definition at line 622 of file v8-fast-api-calls.h.

◆ SPECIALIZE_GET_TYPE_INFO_HELPER_FOR_TA

#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR_TA (   T,
  Enum 
)
Value:
template <> \
struct TypeInfoHelper<const FastApiTypedArray<T>&> { \
static constexpr CTypeInfo::Flags Flags() { \
return CTypeInfo::Flags::kNone; \
} \
\
static constexpr CTypeInfo::Type Type() { return CTypeInfo::Type::Enum; } \
static constexpr CTypeInfo::SequenceType SequenceType() { \
return CTypeInfo::SequenceType::kIsTypedArray; \
} \
};

Definition at line 671 of file v8-fast-api-calls.h.

◆ STATIC_ASSERT_IMPLIES

#define STATIC_ASSERT_IMPLIES (   COND,
  ASSERTION,
  MSG 
)     static_assert(((COND) == 0) || (ASSERTION), MSG)

Definition at line 728 of file v8-fast-api-calls.h.

◆ TYPED_ARRAY_C_TYPES

#define TYPED_ARRAY_C_TYPES (   V)
Value:
V(int32_t, kInt32) \
V(uint32_t, kUint32) \
V(int64_t, kInt64) \
V(uint64_t, kUint64) \
V(float, kFloat32) \
V(double, kFloat64)

Definition at line 684 of file v8-fast-api-calls.h.