Loading...
Searching...
No Matches
v8-fast-api-calls.h
Go to the documentation of this file.
1// Copyright 2020 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef INCLUDE_V8_FAST_API_CALLS_H_
6#define INCLUDE_V8_FAST_API_CALLS_H_
7
206#include <stddef.h>
207#include <stdint.h>
208
209#include <tuple>
210#include <type_traits>
211
212#include "v8-internal.h" // NOLINT(build/include_directory)
213#include "v8-local-handle.h" // NOLINT(build/include_directory)
214#include "v8-typed-array.h" // NOLINT(build/include_directory)
215#include "v8-value.h" // NOLINT(build/include_directory)
216#include "v8config.h" // NOLINT(build/include_directory)
217
218namespace v8 {
219
220class Isolate;
221
224 public:
225 enum class Type : uint8_t {
226 kVoid,
227 kBool,
228 kUint8,
229 kInt32,
230 kUint32,
231 kInt64,
232 kUint64,
233 kFloat32,
234 kFloat64,
235 kPointer,
236 kV8Value,
237 kSeqOneByteString,
238 kApiObject, // This will be deprecated once all users have
239 // migrated from v8::ApiObject to v8::Local<v8::Value>.
240 kAny, // This is added to enable untyped representation of fast
241 // call arguments for test purposes. It can represent any of
242 // the other types stored in the same memory as a union
243 // (see AnyCType declared below). This allows for
244 // uniform passing of arguments w.r.t. their location
245 // (in a register or on the stack), independent of their
246 // actual type. It's currently used by the arm64 simulator
247 // and can be added to the other simulators as well when fast
248 // calls having both GP and FP params need to be supported.
249 };
250
251 // kCallbackOptionsType is not part of the Type enum
252 // because it is only used internally. Use value 255 that is larger
253 // than any valid Type enum.
254 static constexpr Type kCallbackOptionsType = Type(255);
255
256 enum class V8_DEPRECATED(
257 "There is no special support in V8 anymore, there is no need to"
258 "use a SequenceType") SequenceType : uint8_t {
259 kScalar,
260 kIsSequence, // sequence<T>
261 kIsArrayBuffer // ArrayBuffer
262 };
263
264 enum class Flags : uint8_t {
265 kNone = 0,
266 kAllowSharedBit = 1 << 0, // Must be an ArrayBuffer or TypedArray
267 kEnforceRangeBit = 1 << 1, // T must be integral
268 kClampBit = 1 << 2, // T must be integral
269 kIsRestrictedBit = 1 << 3, // T must be float or double
270 };
271
272 explicit constexpr CTypeInfo(Type type, Flags flags = Flags::kNone)
273 : type_(type), sequence_type_(SequenceType::kScalar), flags_(flags) {}
274
275 V8_DEPRECATED("Use CTypeInfo(Type, Flags) instead")
276 constexpr CTypeInfo(Type type, SequenceType sequence_type,
277 Flags flags = Flags::kNone)
278 : type_(type), sequence_type_(sequence_type), flags_(flags) {}
279
280 typedef uint32_t Identifier;
281 explicit constexpr CTypeInfo(Identifier identifier)
282 : CTypeInfo(static_cast<Type>(identifier >> 16),
283 static_cast<SequenceType>((identifier >> 8) & 255),
284 static_cast<Flags>(identifier & 255)) {}
285 constexpr Identifier GetId() const {
286 return static_cast<uint8_t>(type_) << 16 |
287 static_cast<uint8_t>(sequence_type_) << 8 |
288 static_cast<uint8_t>(flags_);
289 }
290
291 constexpr Type GetType() const { return type_; }
292 V8_DEPRECATED("Use the constant SequenceType::kScalar instead")
293 constexpr SequenceType GetSequenceType() const { return sequence_type_; }
294 constexpr Flags GetFlags() const { return flags_; }
295
296 static constexpr bool IsIntegralType(Type type) {
297 return type == Type::kUint8 || type == Type::kInt32 ||
298 type == Type::kUint32 || type == Type::kInt64 ||
299 type == Type::kUint64;
300 }
301
302 static constexpr bool IsFloatingPointType(Type type) {
303 return type == Type::kFloat32 || type == Type::kFloat64;
304 }
305
306 static constexpr bool IsPrimitive(Type type) {
307 return IsIntegralType(type) || IsFloatingPointType(type) ||
308 type == Type::kBool;
309 }
310
311 private:
312 Type type_;
313 SequenceType sequence_type_;
314 Flags flags_;
315};
317
319 const char* data;
320 uint32_t length;
321};
322
324 public:
325 enum class Int64Representation : uint8_t {
326 kNumber = 0, // Use numbers to represent 64 bit integers.
327 kBigInt = 1, // Use BigInts to represent 64 bit integers.
328 };
329
330 // Construct a struct to hold a CFunction's type information.
331 // |return_info| describes the function's return type.
332 // |arg_info| is an array of |arg_count| CTypeInfos describing the
333 // arguments. Only the last argument may be of the special type
334 // CTypeInfo::kCallbackOptionsType.
335 CFunctionInfo(const CTypeInfo& return_info, unsigned int arg_count,
336 const CTypeInfo* arg_info,
337 Int64Representation repr = Int64Representation::kNumber);
338
339 const CTypeInfo& ReturnInfo() const { return return_info_; }
340
341 // The argument count, not including the v8::FastApiCallbackOptions
342 // if present.
343 unsigned int ArgumentCount() const {
344 return HasOptions() ? arg_count_ - 1 : arg_count_;
345 }
346
348
349 // |index| must be less than ArgumentCount().
350 // Note: if the last argument passed on construction of CFunctionInfo
351 // has type CTypeInfo::kCallbackOptionsType, it is not included in
352 // ArgumentCount().
353 const CTypeInfo& ArgumentInfo(unsigned int index) const;
354
355 bool HasOptions() const {
356 // The options arg is always the last one.
357 return arg_count_ > 0 && arg_info_[arg_count_ - 1].GetType() ==
358 CTypeInfo::kCallbackOptionsType;
359 }
360
361 private:
362 const CTypeInfo return_info_;
363 const Int64Representation repr_;
364 const unsigned int arg_count_;
365 const CTypeInfo* arg_info_;
366};
367
368struct FastApiCallbackOptions;
369
370// Provided for testing.
372 AnyCType() : int64_value(0) {}
373
374#if defined(V8_ENABLE_LOCAL_OFF_STACK_CHECK) && V8_HAS_ATTRIBUTE_TRIVIAL_ABI
375 // In this case, Local<T> is not trivially copyable and the implicit
376 // copy constructor and copy assignment for the union are deleted.
377 AnyCType(const AnyCType& other) : int64_value(other.int64_value) {}
378 AnyCType& operator=(const AnyCType& other) {
379 int64_value = other.int64_value;
380 return *this;
381 }
382#endif
383
385 int32_t int32_value;
386 uint32_t uint32_value;
387 int64_t int64_value;
388 uint64_t uint64_value;
396};
397
398static_assert(
399 sizeof(AnyCType) == 8,
400 "The union AnyCType should have size == 64 bits, as this is assumed "
401 "by EffectControlLinearizer.");
402
404 public:
405 constexpr CFunction() : address_(nullptr), type_info_(nullptr) {}
406
407 const CTypeInfo& ReturnInfo() const { return type_info_->ReturnInfo(); }
408
409 const CTypeInfo& ArgumentInfo(unsigned int index) const {
410 return type_info_->ArgumentInfo(index);
411 }
412
413 unsigned int ArgumentCount() const { return type_info_->ArgumentCount(); }
414
415 const void* GetAddress() const { return address_; }
417 return type_info_->GetInt64Representation();
418 }
419 const CFunctionInfo* GetTypeInfo() const { return type_info_; }
420
421 enum class OverloadResolution { kImpossible, kAtRuntime, kAtCompileTime };
422
423 template <typename F>
424 static CFunction Make(F* func,
426 CFunctionInfo::Int64Representation::kNumber) {
427 CFunction result = ArgUnwrap<F*>::Make(func, int64_rep);
428 result.GetInt64Representation();
429 return result;
430 }
431
432 // Provided for testing purposes.
433 template <typename R, typename... Args, typename R_Patch,
434 typename... Args_Patch>
435 static CFunction Make(R (*func)(Args...),
436 R_Patch (*patching_func)(Args_Patch...),
438 CFunctionInfo::Int64Representation::kNumber) {
439 CFunction c_func = ArgUnwrap<R (*)(Args...)>::Make(func, int64_rep);
440 static_assert(
441 sizeof...(Args_Patch) == sizeof...(Args),
442 "The patching function must have the same number of arguments.");
443 c_func.address_ = reinterpret_cast<void*>(patching_func);
444 return c_func;
445 }
446
447 CFunction(const void* address, const CFunctionInfo* type_info);
448
449 private:
450 const void* address_;
451 const CFunctionInfo* type_info_;
452
453 template <typename F>
454 class ArgUnwrap {
455 static_assert(sizeof(F) != sizeof(F),
456 "CFunction must be created from a function pointer.");
457 };
458
459 template <typename R, typename... Args>
460 class ArgUnwrap<R (*)(Args...)> {
461 public:
462 static CFunction Make(R (*func)(Args...),
464 CFunctionInfo::Int64Representation::kNumber);
465 };
466};
467
480 return {};
481 }
482
484
489};
490
491namespace internal {
492
493// Helper to count the number of occurances of `T` in `List`
494template <typename T, typename... List>
495struct count : std::integral_constant<int, 0> {};
496template <typename T, typename... Args>
497struct count<T, T, Args...>
498 : std::integral_constant<std::size_t, 1 + count<T, Args...>::value> {};
499template <typename T, typename U, typename... Args>
500struct count<T, U, Args...> : count<T, Args...> {};
501
502template <CFunctionInfo::Int64Representation Representation,
503 typename RetBuilder, typename... ArgBuilders>
505 static constexpr int kOptionsArgCount =
506 count<FastApiCallbackOptions&, ArgBuilders...>();
507 static constexpr int kReceiverCount = 1;
508
509 static_assert(kOptionsArgCount == 0 || kOptionsArgCount == 1,
510 "Only one options parameter is supported.");
511
512 static_assert(sizeof...(ArgBuilders) >= kOptionsArgCount + kReceiverCount,
513 "The receiver or the options argument is missing.");
514
515 public:
517 : CFunctionInfo(RetBuilder::Build(), sizeof...(ArgBuilders),
518 arg_info_storage_, Representation),
519 arg_info_storage_{ArgBuilders::Build()...} {
520 constexpr CTypeInfo::Type kReturnType = RetBuilder::Build().GetType();
521 static_assert(kReturnType == CTypeInfo::Type::kVoid ||
522 kReturnType == CTypeInfo::Type::kBool ||
523 kReturnType == CTypeInfo::Type::kInt32 ||
524 kReturnType == CTypeInfo::Type::kUint32 ||
525 kReturnType == CTypeInfo::Type::kInt64 ||
526 kReturnType == CTypeInfo::Type::kUint64 ||
527 kReturnType == CTypeInfo::Type::kFloat32 ||
528 kReturnType == CTypeInfo::Type::kFloat64 ||
529 kReturnType == CTypeInfo::Type::kPointer ||
530 kReturnType == CTypeInfo::Type::kAny,
531 "String and api object values are not currently "
532 "supported return types.");
533 }
534
535 private:
536 const CTypeInfo arg_info_storage_[sizeof...(ArgBuilders)];
537};
538
539template <typename T>
541 static_assert(sizeof(T) != sizeof(T), "This type is not supported");
542};
543
544#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR(T, Enum) \
545 template <> \
546 struct TypeInfoHelper<T> { \
547 static constexpr CTypeInfo::Flags Flags() { \
548 return CTypeInfo::Flags::kNone; \
549 } \
550 \
551 static constexpr CTypeInfo::Type Type() { return CTypeInfo::Type::Enum; } \
552 };
553
554template <CTypeInfo::Type type>
556
557#define DEFINE_TYPE_INFO_TRAITS(CType, Enum) \
558 template <> \
559 struct CTypeInfoTraits<CTypeInfo::Type::Enum> { \
560 using ctype = CType; \
561 };
562
563#define PRIMITIVE_C_TYPES(V) \
564 V(bool, kBool) \
565 V(uint8_t, kUint8) \
566 V(int32_t, kInt32) \
567 V(uint32_t, kUint32) \
568 V(int64_t, kInt64) \
569 V(uint64_t, kUint64) \
570 V(float, kFloat32) \
571 V(double, kFloat64) \
572 V(void*, kPointer)
573
574// Same as above, but includes deprecated types for compatibility.
575#define ALL_C_TYPES(V) \
576 PRIMITIVE_C_TYPES(V) \
577 V(void, kVoid) \
578 V(v8::Local<v8::Value>, kV8Value) \
579 V(v8::Local<v8::Object>, kV8Value) \
580 V(v8::Local<v8::Array>, kV8Value) \
581 V(AnyCType, kAny)
582
583// ApiObject was a temporary solution to wrap the pointer to the v8::Value.
584// Please use v8::Local<v8::Value> in new code for the arguments and
585// v8::Local<v8::Object> for the receiver, as ApiObject will be deprecated.
586
589
590#undef PRIMITIVE_C_TYPES
591#undef ALL_C_TYPES
592
593#undef TYPED_ARRAY_C_TYPES
595template <>
597 static constexpr CTypeInfo::Flags Flags() { return CTypeInfo::Flags::kNone; }
598
599 static constexpr CTypeInfo::Type Type() {
601 }
604template <>
606 static constexpr CTypeInfo::Flags Flags() { return CTypeInfo::Flags::kNone; }
607
608 static constexpr CTypeInfo::Type Type() {
611};
612
613#define STATIC_ASSERT_IMPLIES(COND, ASSERTION, MSG) \
614 static_assert(((COND) == 0) || (ASSERTION), MSG)
615
616} // namespace internal
617
618template <typename T, CTypeInfo::Flags... Flags>
620 public:
621 using BaseType = T;
622
623 static constexpr CTypeInfo Build() {
624 constexpr CTypeInfo::Flags kFlags =
625 MergeFlags(internal::TypeInfoHelper<T>::Flags(), Flags...);
627
629 uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kEnforceRangeBit),
630 CTypeInfo::IsIntegralType(kType),
631 "kEnforceRangeBit is only allowed for integral types.");
633 uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kClampBit),
634 CTypeInfo::IsIntegralType(kType),
635 "kClampBit is only allowed for integral types.");
637 uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kIsRestrictedBit),
638 CTypeInfo::IsFloatingPointType(kType),
639 "kIsRestrictedBit is only allowed for floating point types.");
640
641 // Return the same type with the merged flags.
643 }
644
645 private:
646 template <typename... Rest>
647 static constexpr CTypeInfo::Flags MergeFlags(CTypeInfo::Flags flags,
648 Rest... rest) {
649 return CTypeInfo::Flags(uint8_t(flags) | uint8_t(MergeFlags(rest...)));
650 }
651 static constexpr CTypeInfo::Flags MergeFlags() { return CTypeInfo::Flags(0); }
652};
654namespace internal {
655template <typename RetBuilder, typename... ArgBuilders>
657 public:
658 explicit constexpr CFunctionBuilderWithFunction(const void* fn) : fn_(fn) {}
659
660 template <CTypeInfo::Flags... Flags>
661 constexpr auto Ret() {
663 CTypeInfoBuilder<typename RetBuilder::BaseType, Flags...>,
664 ArgBuilders...>(fn_);
666
667 template <unsigned int N, CTypeInfo::Flags... Flags>
668 constexpr auto Arg() {
669 // Return a copy of the builder with the Nth arg builder merged with
670 // template parameter pack Flags.
671 return ArgImpl<N, Flags...>(
672 std::make_index_sequence<sizeof...(ArgBuilders)>());
673 }
675 // Provided for testing purposes.
676 template <typename Ret, typename... Args>
677 auto Patch(Ret (*patching_func)(Args...)) {
678 static_assert(
679 sizeof...(Args) == sizeof...(ArgBuilders),
680 "The patching function must have the same number of arguments.");
681 fn_ = reinterpret_cast<void*>(patching_func);
682 return *this;
683 }
685 template <CFunctionInfo::Int64Representation Representation =
687 auto Build() {
688 static CFunctionInfoImpl<Representation, RetBuilder, ArgBuilders...>
689 instance;
690 return CFunction(fn_, &instance);
691 }
692
693 private:
694 template <bool Merge, unsigned int N, CTypeInfo::Flags... Flags>
695 struct GetArgBuilder;
696
697 // Returns the same ArgBuilder as the one at index N, including its flags.
698 // Flags in the template parameter pack are ignored.
699 template <unsigned int N, CTypeInfo::Flags... Flags>
700 struct GetArgBuilder<false, N, Flags...> {
701 using type = std::tuple_element_t<N, std::tuple<ArgBuilders...>>;
702 };
703
704 // Returns an ArgBuilder with the same base type as the one at index N,
705 // but merges the flags with the flags in the template parameter pack.
706 template <unsigned int N, CTypeInfo::Flags... Flags>
707 struct GetArgBuilder<true, N, Flags...> {
708 using type = CTypeInfoBuilder<
709 typename std::tuple_element_t<N, std::tuple<ArgBuilders...>>::BaseType,
710 std::tuple_element_t<N, std::tuple<ArgBuilders...>>::Build().GetFlags(),
711 Flags...>;
712 };
713
714 // Return a copy of the CFunctionBuilder, but merges the Flags on
715 // ArgBuilder index N with the new Flags passed in the template parameter
716 // pack.
717 template <unsigned int N, CTypeInfo::Flags... Flags, size_t... I>
718 constexpr auto ArgImpl(std::index_sequence<I...>) {
719 return CFunctionBuilderWithFunction<
720 RetBuilder, typename GetArgBuilder<N == I, I, Flags...>::type...>(fn_);
721 }
722
723 const void* fn_;
724};
726class CFunctionBuilder {
727 public:
728 constexpr CFunctionBuilder() {}
729
730 template <typename R, typename... Args>
731 constexpr auto Fn(R (*fn)(Args...)) {
734 reinterpret_cast<const void*>(fn));
735 }
736};
737
738} // namespace internal
739
740// static
741template <typename R, typename... Args>
742CFunction CFunction::ArgUnwrap<R (*)(Args...)>::Make(
743 R (*func)(Args...), CFunctionInfo::Int64Representation int64_rep) {
745 return internal::CFunctionBuilder().Fn(func).Build();
746 }
747 return internal::CFunctionBuilder()
748 .Fn(func)
749 .template Build<CFunctionInfo::Int64Representation::kBigInt>();
750}
751
752using CFunctionBuilder = internal::CFunctionBuilder;
753
754static constexpr CTypeInfo kTypeInfoInt32 = CTypeInfo(CTypeInfo::Type::kInt32);
755static constexpr CTypeInfo kTypeInfoFloat64 =
756 CTypeInfo(CTypeInfo::Type::kFloat64);
757
770template <CTypeInfo::Identifier type_info_id, typename T>
772 Local<Array> src, T* dst, uint32_t max_length);
773
774template <>
776TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<int32_t>::Build().GetId(),
777 int32_t>(Local<Array> src, int32_t* dst,
778 uint32_t max_length);
779
780template <>
782TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<uint32_t>::Build().GetId(),
783 uint32_t>(Local<Array> src, uint32_t* dst,
784 uint32_t max_length);
785
786template <>
788TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<float>::Build().GetId(),
789 float>(Local<Array> src, float* dst,
790 uint32_t max_length);
791
792template <>
794TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<double>::Build().GetId(),
795 double>(Local<Array> src, double* dst,
796 uint32_t max_length);
797
798} // namespace v8
799
800#endif // INCLUDE_V8_FAST_API_CALLS_H_
Definition: v8-fast-api-calls.h:323
Int64Representation GetInt64Representation() const
Definition: v8-fast-api-calls.h:347
Int64Representation
Definition: v8-fast-api-calls.h:325
const CTypeInfo & ReturnInfo() const
Definition: v8-fast-api-calls.h:339
const CTypeInfo & ArgumentInfo(unsigned int index) const
bool HasOptions() const
Definition: v8-fast-api-calls.h:355
unsigned int ArgumentCount() const
Definition: v8-fast-api-calls.h:343
CFunctionInfo(const CTypeInfo &return_info, unsigned int arg_count, const CTypeInfo *arg_info, Int64Representation repr=Int64Representation::kNumber)
Definition: v8-fast-api-calls.h:403
const CTypeInfo & ReturnInfo() const
Definition: v8-fast-api-calls.h:407
constexpr CFunction()
Definition: v8-fast-api-calls.h:405
const CTypeInfo & ArgumentInfo(unsigned int index) const
Definition: v8-fast-api-calls.h:409
unsigned int ArgumentCount() const
Definition: v8-fast-api-calls.h:413
CFunctionInfo::Int64Representation GetInt64Representation() const
Definition: v8-fast-api-calls.h:416
CFunction(const void *address, const CFunctionInfo *type_info)
static CFunction Make(R(*func)(Args...), R_Patch(*patching_func)(Args_Patch...), CFunctionInfo::Int64Representation int64_rep=CFunctionInfo::Int64Representation::kNumber)
Definition: v8-fast-api-calls.h:435
const void * GetAddress() const
Definition: v8-fast-api-calls.h:415
OverloadResolution
Definition: v8-fast-api-calls.h:421
const CFunctionInfo * GetTypeInfo() const
Definition: v8-fast-api-calls.h:419
static CFunction Make(F *func, CFunctionInfo::Int64Representation int64_rep=CFunctionInfo::Int64Representation::kNumber)
Definition: v8-fast-api-calls.h:424
Definition: v8-fast-api-calls.h:616
static constexpr CTypeInfo Build()
Definition: v8-fast-api-calls.h:620
T BaseType
Definition: v8-fast-api-calls.h:618
Definition: v8-fast-api-calls.h:223
Flags
Definition: v8-fast-api-calls.h:264
constexpr CTypeInfo(Type type, Flags flags=Flags::kNone)
Definition: v8-fast-api-calls.h:272
static constexpr bool IsFloatingPointType(Type type)
Definition: v8-fast-api-calls.h:302
static constexpr bool IsPrimitive(Type type)
Definition: v8-fast-api-calls.h:306
static constexpr Type kCallbackOptionsType
Definition: v8-fast-api-calls.h:254
static constexpr bool IsIntegralType(Type type)
Definition: v8-fast-api-calls.h:296
SequenceType
Definition: v8-fast-api-calls.h:258
constexpr Identifier GetId() const
Definition: v8-fast-api-calls.h:285
constexpr Type GetType() const
Definition: v8-fast-api-calls.h:291
constexpr Flags GetFlags() const
Definition: v8-fast-api-calls.h:294
Type
Definition: v8-fast-api-calls.h:225
uint32_t Identifier
Definition: v8-fast-api-calls.h:280
constexpr CTypeInfo(Identifier identifier)
Definition: v8-fast-api-calls.h:281
Definition: v8-isolate.h:290
Definition: v8-local-handle.h:366
Definition: v8-fast-api-calls.h:653
auto Build()
Definition: v8-fast-api-calls.h:684
constexpr auto Ret()
Definition: v8-fast-api-calls.h:658
constexpr auto Arg()
Definition: v8-fast-api-calls.h:665
auto Patch(Ret(*patching_func)(Args...))
Definition: v8-fast-api-calls.h:674
Definition: v8-fast-api-calls.h:723
constexpr CFunctionBuilder()
Definition: v8-fast-api-calls.h:725
constexpr auto Fn(R(*fn)(Args...))
Definition: v8-fast-api-calls.h:728
Definition: v8-fast-api-calls.h:504
constexpr CFunctionInfoImpl()
Definition: v8-fast-api-calls.h:516
Definition: libplatform.h:15
bool TryToCopyAndConvertArrayToCppBuffer(Local< Array > src, T *dst, uint32_t max_length)
internal::CFunctionBuilder CFunctionBuilder
Definition: v8-fast-api-calls.h:749
Definition: v8-fast-api-calls.h:474
v8::Isolate * isolate
Definition: v8-fast-api-calls.h:483
v8::Local< v8::Value > data
Definition: v8-fast-api-calls.h:488
static FastApiCallbackOptions CreateForTesting(Isolate *isolate)
Definition: v8-fast-api-calls.h:479
Definition: v8-fast-api-calls.h:318
const char * data
Definition: v8-fast-api-calls.h:319
uint32_t length
Definition: v8-fast-api-calls.h:320
Definition: v8-fast-api-calls.h:555
Definition: v8-fast-api-calls.h:540
Definition: v8-fast-api-calls.h:495
Definition: v8-fast-api-calls.h:371
FastApiCallbackOptions * options_value
Definition: v8-fast-api-calls.h:395
AnyCType()
Definition: v8-fast-api-calls.h:372
const FastOneByteString * string_value
Definition: v8-fast-api-calls.h:394
Local< Array > sequence_value
Definition: v8-fast-api-calls.h:393
Local< Object > object_value
Definition: v8-fast-api-calls.h:392
double double_value
Definition: v8-fast-api-calls.h:390
void * pointer_value
Definition: v8-fast-api-calls.h:391
uint32_t uint32_value
Definition: v8-fast-api-calls.h:386
bool bool_value
Definition: v8-fast-api-calls.h:384
float float_value
Definition: v8-fast-api-calls.h:389
uint64_t uint64_value
Definition: v8-fast-api-calls.h:388
int32_t int32_value
Definition: v8-fast-api-calls.h:385
int64_t int64_value
Definition: v8-fast-api-calls.h:387
#define DEFINE_TYPE_INFO_TRAITS(CType, Enum)
Definition: v8-fast-api-calls.h:557
#define PRIMITIVE_C_TYPES(V)
Definition: v8-fast-api-calls.h:563
#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR(T, Enum)
Definition: v8-fast-api-calls.h:544
#define ALL_C_TYPES(V)
Definition: v8-fast-api-calls.h:575
#define STATIC_ASSERT_IMPLIES(COND, ASSERTION, MSG)
Definition: v8-fast-api-calls.h:610
#define V8_EXPORT
Definition: v8config.h:860
#define V8_DEPRECATED(message)
Definition: v8config.h:619
#define END_ALLOW_USE_DEPRECATED()
Definition: v8config.h:647
#define V8_WARN_UNUSED_RESULT
Definition: v8config.h:684
#define V8_TRIVIAL_ABI
Definition: v8config.h:813
#define START_ALLOW_USE_DEPRECATED()
Definition: v8config.h:646