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-external.h" // NOLINT(build/include_directory)
213#include "v8-internal.h" // NOLINT(build/include_directory)
214#include "v8-local-handle.h" // NOLINT(build/include_directory)
215#include "v8-typed-array.h" // NOLINT(build/include_directory)
216#include "v8-value.h" // NOLINT(build/include_directory)
217#include "v8config.h" // NOLINT(build/include_directory)
218
219namespace v8 {
220
221class Isolate;
222
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,
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 Flags : uint8_t {
257 kNone = 0,
258 kAllowSharedBit = 1 << 0, // Must be an ArrayBuffer or TypedArray
259 kEnforceRangeBit = 1 << 1, // T must be integral
260 kClampBit = 1 << 2, // T must be integral
261 kIsRestrictedBit = 1 << 3, // T must be float or double
262 };
263
264 explicit constexpr CTypeInfo(Type type, Flags flags = Flags::kNone)
265 : type_(type), flags_(flags) {}
266
267 typedef uint32_t Identifier;
268 explicit constexpr CTypeInfo(Identifier identifier)
269 : type_(static_cast<Type>((identifier >> 8) & 255)),
270 flags_(static_cast<Flags>(identifier & 255)) {}
271 constexpr Identifier GetId() const {
272 return static_cast<uint8_t>(type_) << 8 |
273 static_cast<uint8_t>(flags_);
274 }
275
276 constexpr Type GetType() const { return type_; }
277 constexpr Flags GetFlags() const { return flags_; }
278
279 static constexpr bool IsIntegralType(Type type) {
280 return type == Type::kUint8 || type == Type::kInt32 ||
281 type == Type::kUint32 || type == Type::kInt64 ||
282 type == Type::kUint64;
283 }
284
285 static constexpr bool IsFloatingPointType(Type type) {
286 return type == Type::kFloat32 || type == Type::kFloat64;
287 }
288
289 static constexpr bool IsPrimitive(Type type) {
290 return IsIntegralType(type) || IsFloatingPointType(type) ||
291 type == Type::kBool;
292 }
293
294 private:
295 Type type_;
296 Flags flags_;
297};
298
300 const char* data;
301 uint32_t length;
302};
303
305 public:
306 enum class Int64Representation : uint8_t {
307 kNumber = 0, // Use numbers to represent 64 bit integers.
308 kBigInt = 1, // Use BigInts to represent 64 bit integers.
309 };
310
311 // Construct a struct to hold a CFunction's type information.
312 // |return_info| describes the function's return type.
313 // |arg_info| is an array of |arg_count| CTypeInfos describing the
314 // arguments. Only the last argument may be of the special type
315 // CTypeInfo::kCallbackOptionsType.
316 CFunctionInfo(const CTypeInfo& return_info, unsigned int arg_count,
317 const CTypeInfo* arg_info,
318 Int64Representation repr = Int64Representation::kNumber);
319
320 const CTypeInfo& ReturnInfo() const { return return_info_; }
321
322 // The argument count, not including the v8::FastApiCallbackOptions
323 // if present.
324 unsigned int ArgumentCount() const {
325 return HasOptions() ? arg_count_ - 1 : arg_count_;
326 }
327
329
330 // |index| must be less than ArgumentCount().
331 // Note: if the last argument passed on construction of CFunctionInfo
332 // has type CTypeInfo::kCallbackOptionsType, it is not included in
333 // ArgumentCount().
334 const CTypeInfo& ArgumentInfo(unsigned int index) const;
335
336 bool HasOptions() const {
337 // The options arg is always the last one.
338 return arg_count_ > 0 && arg_info_[arg_count_ - 1].GetType() ==
339 CTypeInfo::kCallbackOptionsType;
340 }
341
342 private:
343 const CTypeInfo return_info_;
344 const Int64Representation repr_;
345 const unsigned int arg_count_;
346 const CTypeInfo* arg_info_;
347};
348
349struct FastApiCallbackOptions;
350
351// Provided for testing.
353 AnyCType() : int64_value(0) {}
354
355#if defined(V8_ENABLE_LOCAL_OFF_STACK_CHECK) && V8_HAS_ATTRIBUTE_TRIVIAL_ABI
356 // In this case, Local<T> is not trivially copyable and the implicit
357 // copy constructor and copy assignment for the union are deleted.
358 AnyCType(const AnyCType& other) : int64_value(other.int64_value) {}
359 AnyCType& operator=(const AnyCType& other) {
360 int64_value = other.int64_value;
361 return *this;
362 }
363#endif
364
366 int32_t int32_value;
367 uint32_t uint32_value;
368 int64_t int64_value;
369 uint64_t uint64_value;
377};
378
379static_assert(
380 sizeof(AnyCType) == 8,
381 "The union AnyCType should have size == 64 bits, as this is assumed "
382 "by EffectControlLinearizer.");
383
385 public:
386 constexpr CFunction() : address_(nullptr), type_info_(nullptr) {}
387
388 const CTypeInfo& ReturnInfo() const { return type_info_->ReturnInfo(); }
389
390 const CTypeInfo& ArgumentInfo(unsigned int index) const {
391 return type_info_->ArgumentInfo(index);
392 }
393
394 unsigned int ArgumentCount() const { return type_info_->ArgumentCount(); }
395
396 const void* GetAddress() const { return address_; }
398 return type_info_->GetInt64Representation();
399 }
400 const CFunctionInfo* GetTypeInfo() const { return type_info_; }
401
402 enum class OverloadResolution { kImpossible, kAtRuntime, kAtCompileTime };
403
404 template <typename F>
405 static CFunction Make(F* func,
407 CFunctionInfo::Int64Representation::kNumber) {
408 CFunction result = ArgUnwrap<F*>::Make(func, int64_rep);
409 result.GetInt64Representation();
410 return result;
411 }
412
413 // Provided for testing purposes.
414 template <typename R, typename... Args, typename R_Patch,
415 typename... Args_Patch>
416 static CFunction Make(R (*func)(Args...),
417 R_Patch (*patching_func)(Args_Patch...),
419 CFunctionInfo::Int64Representation::kNumber) {
420 CFunction c_func = ArgUnwrap<R (*)(Args...)>::Make(func, int64_rep);
421 static_assert(
422 sizeof...(Args_Patch) == sizeof...(Args),
423 "The patching function must have the same number of arguments.");
424 c_func.address_ = reinterpret_cast<void*>(patching_func);
425 return c_func;
426 }
427
428 CFunction(const void* address, const CFunctionInfo* type_info);
429
430 private:
431 const void* address_;
432 const CFunctionInfo* type_info_;
433
434 template <typename F>
435 class ArgUnwrap {
436 static_assert(sizeof(F) != sizeof(F),
437 "CFunction must be created from a function pointer.");
438 };
439
440 template <typename R, typename... Args>
441 class ArgUnwrap<R (*)(Args...)> {
442 public:
443 static CFunction Make(R (*func)(Args...),
445 CFunctionInfo::Int64Representation::kNumber);
446 };
447};
448
461 return {};
462 }
463
465
470};
471
472namespace internal {
473
474// Helper to count the number of occurances of `T` in `List`
475template <typename T, typename... List>
476struct count : std::integral_constant<int, 0> {};
477template <typename T, typename... Args>
478struct count<T, T, Args...>
479 : std::integral_constant<std::size_t, 1 + count<T, Args...>::value> {};
480template <typename T, typename U, typename... Args>
481struct count<T, U, Args...> : count<T, Args...> {};
482
483template <CFunctionInfo::Int64Representation Representation,
484 typename RetBuilder, typename... ArgBuilders>
486 static constexpr int kOptionsArgCount =
487 count<FastApiCallbackOptions&, ArgBuilders...>();
488 static constexpr int kReceiverCount = 1;
489
490 static_assert(kOptionsArgCount == 0 || kOptionsArgCount == 1,
491 "Only one options parameter is supported.");
492
493 static_assert(sizeof...(ArgBuilders) >= kOptionsArgCount + kReceiverCount,
494 "The receiver or the options argument is missing.");
495
496 public:
498 : CFunctionInfo(RetBuilder::Build(), sizeof...(ArgBuilders),
499 arg_info_storage_, Representation),
500 arg_info_storage_{ArgBuilders::Build()...} {
501 constexpr CTypeInfo::Type kReturnType = RetBuilder::Build().GetType();
502 static_assert(kReturnType == CTypeInfo::Type::kVoid ||
503 kReturnType == CTypeInfo::Type::kBool ||
504 kReturnType == CTypeInfo::Type::kInt32 ||
505 kReturnType == CTypeInfo::Type::kUint32 ||
506 kReturnType == CTypeInfo::Type::kInt64 ||
507 kReturnType == CTypeInfo::Type::kUint64 ||
508 kReturnType == CTypeInfo::Type::kFloat32 ||
509 kReturnType == CTypeInfo::Type::kFloat64 ||
510 kReturnType == CTypeInfo::Type::kPointer ||
511 kReturnType == CTypeInfo::Type::kAny,
512 "String and api object values are not currently "
513 "supported return types.");
514 }
515
516 private:
517 const CTypeInfo arg_info_storage_[sizeof...(ArgBuilders)];
518};
519
520template <typename T>
522 static_assert(sizeof(T) != sizeof(T), "This type is not supported");
523};
524
525#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR(T, Enum) \
526 template <> \
527 struct TypeInfoHelper<T> { \
528 static constexpr CTypeInfo::Flags Flags() { \
529 return CTypeInfo::Flags::kNone; \
530 } \
531 \
532 static constexpr CTypeInfo::Type Type() { return CTypeInfo::Type::Enum; } \
533 };
534
535template <CTypeInfo::Type type>
537
538#define DEFINE_TYPE_INFO_TRAITS(CType, Enum) \
539 template <> \
540 struct CTypeInfoTraits<CTypeInfo::Type::Enum> { \
541 using ctype = CType; \
542 };
543
544#define PRIMITIVE_C_TYPES(V) \
545 V(bool, kBool) \
546 V(uint8_t, kUint8) \
547 V(int32_t, kInt32) \
548 V(uint32_t, kUint32) \
549 V(int64_t, kInt64) \
550 V(uint64_t, kUint64) \
551 V(float, kFloat32) \
552 V(double, kFloat64) \
553 V(void*, kPointer)
554
555// Same as above, but includes deprecated types for compatibility.
556#define ALL_C_TYPES(V) \
557 PRIMITIVE_C_TYPES(V) \
558 V(void, kVoid) \
559 V(v8::Local<v8::Value>, kV8Value) \
560 V(v8::Local<v8::Object>, kV8Value) \
561 V(v8::Local<v8::Array>, kV8Value) \
562 V(AnyCType, kAny)
563
564// ApiObject was a temporary solution to wrap the pointer to the v8::Value.
565// Please use v8::Local<v8::Value> in new code for the arguments and
566// v8::Local<v8::Object> for the receiver, as ApiObject will be deprecated.
567
570
571#undef PRIMITIVE_C_TYPES
572#undef ALL_C_TYPES
573
574#undef TYPED_ARRAY_C_TYPES
576template <>
578 static constexpr CTypeInfo::Flags Flags() { return CTypeInfo::Flags::kNone; }
579
580 static constexpr CTypeInfo::Type Type() {
582 }
585template <>
587 static constexpr CTypeInfo::Flags Flags() { return CTypeInfo::Flags::kNone; }
588
589 static constexpr CTypeInfo::Type Type() {
592};
593
594#define STATIC_ASSERT_IMPLIES(COND, ASSERTION, MSG) \
595 static_assert(((COND) == 0) || (ASSERTION), MSG)
596
597} // namespace internal
598
599template <typename T, CTypeInfo::Flags... Flags>
601 public:
602 using BaseType = T;
603
604 static constexpr CTypeInfo Build() {
605 constexpr CTypeInfo::Flags kFlags =
606 MergeFlags(internal::TypeInfoHelper<T>::Flags(), Flags...);
608
610 uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kEnforceRangeBit),
611 CTypeInfo::IsIntegralType(kType),
612 "kEnforceRangeBit is only allowed for integral types.");
614 uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kClampBit),
615 CTypeInfo::IsIntegralType(kType),
616 "kClampBit is only allowed for integral types.");
618 uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kIsRestrictedBit),
619 CTypeInfo::IsFloatingPointType(kType),
620 "kIsRestrictedBit is only allowed for floating point types.");
621
622 // Return the same type with the merged flags.
624 }
625
626 private:
627 template <typename... Rest>
628 static constexpr CTypeInfo::Flags MergeFlags(CTypeInfo::Flags flags,
629 Rest... rest) {
630 return CTypeInfo::Flags(uint8_t(flags) | uint8_t(MergeFlags(rest...)));
631 }
632 static constexpr CTypeInfo::Flags MergeFlags() { return CTypeInfo::Flags(0); }
633};
635namespace internal {
636template <typename RetBuilder, typename... ArgBuilders>
638 public:
639 explicit constexpr CFunctionBuilderWithFunction(const void* fn) : fn_(fn) {}
640
641 template <CTypeInfo::Flags... Flags>
642 constexpr auto Ret() {
644 CTypeInfoBuilder<typename RetBuilder::BaseType, Flags...>,
645 ArgBuilders...>(fn_);
647
648 template <unsigned int N, CTypeInfo::Flags... Flags>
649 constexpr auto Arg() {
650 // Return a copy of the builder with the Nth arg builder merged with
651 // template parameter pack Flags.
652 return ArgImpl<N, Flags...>(
653 std::make_index_sequence<sizeof...(ArgBuilders)>());
654 }
656 // Provided for testing purposes.
657 template <typename Ret, typename... Args>
658 auto Patch(Ret (*patching_func)(Args...)) {
659 static_assert(
660 sizeof...(Args) == sizeof...(ArgBuilders),
661 "The patching function must have the same number of arguments.");
662 fn_ = reinterpret_cast<void*>(patching_func);
663 return *this;
664 }
666 template <CFunctionInfo::Int64Representation Representation =
668 auto Build() {
669 static CFunctionInfoImpl<Representation, RetBuilder, ArgBuilders...>
670 instance;
671 return CFunction(fn_, &instance);
672 }
673
674 private:
675 template <bool Merge, unsigned int N, CTypeInfo::Flags... Flags>
676 struct GetArgBuilder;
677
678 // Returns the same ArgBuilder as the one at index N, including its flags.
679 // Flags in the template parameter pack are ignored.
680 template <unsigned int N, CTypeInfo::Flags... Flags>
681 struct GetArgBuilder<false, N, Flags...> {
682 using type = std::tuple_element_t<N, std::tuple<ArgBuilders...>>;
683 };
684
685 // Returns an ArgBuilder with the same base type as the one at index N,
686 // but merges the flags with the flags in the template parameter pack.
687 template <unsigned int N, CTypeInfo::Flags... Flags>
688 struct GetArgBuilder<true, N, Flags...> {
689 using type = CTypeInfoBuilder<
690 typename std::tuple_element_t<N, std::tuple<ArgBuilders...>>::BaseType,
691 std::tuple_element_t<N, std::tuple<ArgBuilders...>>::Build().GetFlags(),
692 Flags...>;
693 };
694
695 // Return a copy of the CFunctionBuilder, but merges the Flags on
696 // ArgBuilder index N with the new Flags passed in the template parameter
697 // pack.
698 template <unsigned int N, CTypeInfo::Flags... Flags, size_t... I>
699 constexpr auto ArgImpl(std::index_sequence<I...>) {
700 return CFunctionBuilderWithFunction<
701 RetBuilder, typename GetArgBuilder<N == I, I, Flags...>::type...>(fn_);
702 }
703
704 const void* fn_;
705};
707class CFunctionBuilder {
708 public:
709 constexpr CFunctionBuilder() {}
710
711 template <typename R, typename... Args>
712 constexpr auto Fn(R (*fn)(Args...)) {
715 reinterpret_cast<const void*>(fn));
716 }
717};
718
719} // namespace internal
720
721// static
722template <typename R, typename... Args>
723CFunction CFunction::ArgUnwrap<R (*)(Args...)>::Make(
724 R (*func)(Args...), CFunctionInfo::Int64Representation int64_rep) {
726 return internal::CFunctionBuilder().Fn(func).Build();
727 }
728 return internal::CFunctionBuilder()
729 .Fn(func)
730 .template Build<CFunctionInfo::Int64Representation::kBigInt>();
731}
732
733using CFunctionBuilder = internal::CFunctionBuilder;
734
735static constexpr CTypeInfo kTypeInfoInt32 = CTypeInfo(CTypeInfo::Type::kInt32);
736static constexpr CTypeInfo kTypeInfoFloat64 =
737 CTypeInfo(CTypeInfo::Type::kFloat64);
738
751template <CTypeInfo::Identifier type_info_id, typename T>
753 Local<Array> src, T* dst, uint32_t max_length);
754
755template <>
757TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<int32_t>::Build().GetId(),
758 int32_t>(Local<Array> src, int32_t* dst,
759 uint32_t max_length);
760
761template <>
763TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<uint32_t>::Build().GetId(),
764 uint32_t>(Local<Array> src, uint32_t* dst,
765 uint32_t max_length);
766
767template <>
769TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<float>::Build().GetId(),
770 float>(Local<Array> src, float* dst,
771 uint32_t max_length);
772
773template <>
775TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<double>::Build().GetId(),
776 double>(Local<Array> src, double* dst,
777 uint32_t max_length);
778
781
782} // namespace v8
783
784#endif // INCLUDE_V8_FAST_API_CALLS_H_
Definition: v8-fast-api-calls.h:304
Int64Representation GetInt64Representation() const
Definition: v8-fast-api-calls.h:328
Int64Representation
Definition: v8-fast-api-calls.h:306
const CTypeInfo & ReturnInfo() const
Definition: v8-fast-api-calls.h:320
const CTypeInfo & ArgumentInfo(unsigned int index) const
bool HasOptions() const
Definition: v8-fast-api-calls.h:336
unsigned int ArgumentCount() const
Definition: v8-fast-api-calls.h:324
CFunctionInfo(const CTypeInfo &return_info, unsigned int arg_count, const CTypeInfo *arg_info, Int64Representation repr=Int64Representation::kNumber)
Definition: v8-fast-api-calls.h:384
const CTypeInfo & ReturnInfo() const
Definition: v8-fast-api-calls.h:388
constexpr CFunction()
Definition: v8-fast-api-calls.h:386
const CTypeInfo & ArgumentInfo(unsigned int index) const
Definition: v8-fast-api-calls.h:390
unsigned int ArgumentCount() const
Definition: v8-fast-api-calls.h:394
CFunctionInfo::Int64Representation GetInt64Representation() const
Definition: v8-fast-api-calls.h:397
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:416
const void * GetAddress() const
Definition: v8-fast-api-calls.h:396
OverloadResolution
Definition: v8-fast-api-calls.h:402
const CFunctionInfo * GetTypeInfo() const
Definition: v8-fast-api-calls.h:400
static CFunction Make(F *func, CFunctionInfo::Int64Representation int64_rep=CFunctionInfo::Int64Representation::kNumber)
Definition: v8-fast-api-calls.h:405
Definition: v8-fast-api-calls.h:597
static constexpr CTypeInfo Build()
Definition: v8-fast-api-calls.h:601
T BaseType
Definition: v8-fast-api-calls.h:599
Definition: v8-fast-api-calls.h:223
Flags
Definition: v8-fast-api-calls.h:256
constexpr CTypeInfo(Type type, Flags flags=Flags::kNone)
Definition: v8-fast-api-calls.h:264
static constexpr bool IsFloatingPointType(Type type)
Definition: v8-fast-api-calls.h:285
static constexpr bool IsPrimitive(Type type)
Definition: v8-fast-api-calls.h:289
static constexpr Type kCallbackOptionsType
Definition: v8-fast-api-calls.h:254
static constexpr bool IsIntegralType(Type type)
Definition: v8-fast-api-calls.h:279
constexpr Identifier GetId() const
Definition: v8-fast-api-calls.h:271
constexpr Type GetType() const
Definition: v8-fast-api-calls.h:276
constexpr Flags GetFlags() const
Definition: v8-fast-api-calls.h:277
Type
Definition: v8-fast-api-calls.h:225
uint32_t Identifier
Definition: v8-fast-api-calls.h:267
constexpr CTypeInfo(Identifier identifier)
Definition: v8-fast-api-calls.h:268
Definition: v8-isolate.h:290
Definition: v8-local-handle.h:366
Definition: v8-fast-api-calls.h:634
auto Build()
Definition: v8-fast-api-calls.h:665
constexpr auto Ret()
Definition: v8-fast-api-calls.h:639
constexpr auto Arg()
Definition: v8-fast-api-calls.h:646
auto Patch(Ret(*patching_func)(Args...))
Definition: v8-fast-api-calls.h:655
Definition: v8-fast-api-calls.h:704
constexpr CFunctionBuilder()
Definition: v8-fast-api-calls.h:706
constexpr auto Fn(R(*fn)(Args...))
Definition: v8-fast-api-calls.h:709
Definition: v8-fast-api-calls.h:485
constexpr CFunctionInfoImpl()
Definition: v8-fast-api-calls.h:497
Definition: libplatform.h:15
constexpr v8::ExternalPointerTypeTag kFastAPIPointerTag
Definition: v8-fast-api-calls.h:776
bool TryToCopyAndConvertArrayToCppBuffer(Local< Array > src, T *dst, uint32_t max_length)
uint16_t ExternalPointerTypeTag
Definition: v8-external.h:21
internal::CFunctionBuilder CFunctionBuilder
Definition: v8-fast-api-calls.h:730
Definition: v8-fast-api-calls.h:455
v8::Isolate * isolate
Definition: v8-fast-api-calls.h:464
v8::Local< v8::Value > data
Definition: v8-fast-api-calls.h:469
static FastApiCallbackOptions CreateForTesting(Isolate *isolate)
Definition: v8-fast-api-calls.h:460
Definition: v8-fast-api-calls.h:299
const char * data
Definition: v8-fast-api-calls.h:300
uint32_t length
Definition: v8-fast-api-calls.h:301
Definition: v8-fast-api-calls.h:536
Definition: v8-fast-api-calls.h:521
Definition: v8-fast-api-calls.h:476
Definition: v8-fast-api-calls.h:352
FastApiCallbackOptions * options_value
Definition: v8-fast-api-calls.h:376
AnyCType()
Definition: v8-fast-api-calls.h:353
const FastOneByteString * string_value
Definition: v8-fast-api-calls.h:375
Local< Array > sequence_value
Definition: v8-fast-api-calls.h:374
Local< Object > object_value
Definition: v8-fast-api-calls.h:373
double double_value
Definition: v8-fast-api-calls.h:371
void * pointer_value
Definition: v8-fast-api-calls.h:372
uint32_t uint32_value
Definition: v8-fast-api-calls.h:367
bool bool_value
Definition: v8-fast-api-calls.h:365
float float_value
Definition: v8-fast-api-calls.h:370
uint64_t uint64_value
Definition: v8-fast-api-calls.h:369
int32_t int32_value
Definition: v8-fast-api-calls.h:366
int64_t int64_value
Definition: v8-fast-api-calls.h:368
#define DEFINE_TYPE_INFO_TRAITS(CType, Enum)
Definition: v8-fast-api-calls.h:538
#define PRIMITIVE_C_TYPES(V)
Definition: v8-fast-api-calls.h:544
#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR(T, Enum)
Definition: v8-fast-api-calls.h:525
#define ALL_C_TYPES(V)
Definition: v8-fast-api-calls.h:556
#define STATIC_ASSERT_IMPLIES(COND, ASSERTION, MSG)
Definition: v8-fast-api-calls.h:591
#define V8_EXTERNAL_POINTER_TAG_COUNT
Definition: v8-internal.h:418
#define V8_EXPORT
Definition: v8config.h:855
#define V8_WARN_UNUSED_RESULT
Definition: v8config.h:679
#define V8_TRIVIAL_ABI
Definition: v8config.h:808