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