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 FastApiCallLoweringReducer.");
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
469 V8_DEPRECATE_SOON("Use DataV2 instead")
471
476 V8_INLINE v8::Local<v8::Data> DataV2() const { return data; }
478};
479
480namespace internal {
481
482// Helper to count the number of occurances of `T` in `List`
483template <typename T, typename... List>
484struct count : std::integral_constant<int, 0> {};
485template <typename T, typename... Args>
486struct count<T, T, Args...>
487 : std::integral_constant<std::size_t, 1 + count<T, Args...>::value> {};
488template <typename T, typename U, typename... Args>
489struct count<T, U, Args...> : count<T, Args...> {};
490
491template <CFunctionInfo::Int64Representation Representation,
492 typename RetBuilder, typename... ArgBuilders>
494 static constexpr int kOptionsArgCount =
495 count<FastApiCallbackOptions&, ArgBuilders...>();
496 static constexpr int kReceiverCount = 1;
497
498 static_assert(kOptionsArgCount == 0 || kOptionsArgCount == 1,
499 "Only one options parameter is supported.");
500
501 static_assert(sizeof...(ArgBuilders) >= kOptionsArgCount + kReceiverCount,
502 "The receiver or the options argument is missing.");
503
504 public:
506 : CFunctionInfo(RetBuilder::Build(), sizeof...(ArgBuilders),
507 arg_info_storage_, Representation),
508 arg_info_storage_{ArgBuilders::Build()...} {
509 constexpr CTypeInfo::Type kReturnType = RetBuilder::Build().GetType();
510 static_assert(kReturnType == CTypeInfo::Type::kVoid ||
511 kReturnType == CTypeInfo::Type::kBool ||
512 kReturnType == CTypeInfo::Type::kInt32 ||
513 kReturnType == CTypeInfo::Type::kUint32 ||
514 kReturnType == CTypeInfo::Type::kInt64 ||
515 kReturnType == CTypeInfo::Type::kUint64 ||
516 kReturnType == CTypeInfo::Type::kFloat32 ||
517 kReturnType == CTypeInfo::Type::kFloat64 ||
518 kReturnType == CTypeInfo::Type::kPointer ||
519 kReturnType == CTypeInfo::Type::kAny,
520 "String and api object values are not currently "
521 "supported return types.");
522 }
523
524 private:
525 const CTypeInfo arg_info_storage_[sizeof...(ArgBuilders)];
526};
527
528template <typename T>
530 static_assert(sizeof(T) != sizeof(T), "This type is not supported");
531};
532
533#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR(T, Enum) \
534 template <> \
535 struct TypeInfoHelper<T> { \
536 static constexpr CTypeInfo::Flags Flags() { \
537 return CTypeInfo::Flags::kNone; \
538 } \
539 \
540 static constexpr CTypeInfo::Type Type() { return CTypeInfo::Type::Enum; } \
541 };
542
543template <CTypeInfo::Type type>
545
546#define DEFINE_TYPE_INFO_TRAITS(CType, Enum) \
547 template <> \
548 struct CTypeInfoTraits<CTypeInfo::Type::Enum> { \
549 using ctype = CType; \
550 };
551
552#define PRIMITIVE_C_TYPES(V) \
553 V(bool, kBool) \
554 V(uint8_t, kUint8) \
555 V(int32_t, kInt32) \
556 V(uint32_t, kUint32) \
557 V(int64_t, kInt64) \
558 V(uint64_t, kUint64) \
559 V(float, kFloat32) \
560 V(double, kFloat64) \
561 V(void*, kPointer)
562
563// Same as above, but includes deprecated types for compatibility.
564#define ALL_C_TYPES(V) \
565 PRIMITIVE_C_TYPES(V) \
566 V(void, kVoid) \
567 V(v8::Local<v8::Value>, kV8Value) \
568 V(v8::Local<v8::Object>, kV8Value) \
569 V(v8::Local<v8::Array>, kV8Value) \
570 V(AnyCType, kAny)
571
572// ApiObject was a temporary solution to wrap the pointer to the v8::Value.
573// Please use v8::Local<v8::Value> in new code for the arguments and
574// v8::Local<v8::Object> for the receiver, as ApiObject will be deprecated.
575
578
579#undef PRIMITIVE_C_TYPES
580#undef ALL_C_TYPES
581
582#undef TYPED_ARRAY_C_TYPES
584template <>
586 static constexpr CTypeInfo::Flags Flags() { return CTypeInfo::Flags::kNone; }
587
588 static constexpr CTypeInfo::Type Type() {
590 }
593template <>
595 static constexpr CTypeInfo::Flags Flags() { return CTypeInfo::Flags::kNone; }
596
597 static constexpr CTypeInfo::Type Type() {
600};
601
602#define STATIC_ASSERT_IMPLIES(COND, ASSERTION, MSG) \
603 static_assert(((COND) == 0) || (ASSERTION), MSG)
604
605} // namespace internal
606
607template <typename T, CTypeInfo::Flags... Flags>
609 public:
610 using BaseType = T;
611
612 static constexpr CTypeInfo Build() {
613 constexpr CTypeInfo::Flags kFlags =
614 MergeFlags(internal::TypeInfoHelper<T>::Flags(), Flags...);
616
618 uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kEnforceRangeBit),
619 CTypeInfo::IsIntegralType(kType),
620 "kEnforceRangeBit is only allowed for integral types.");
622 uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kClampBit),
623 CTypeInfo::IsIntegralType(kType),
624 "kClampBit is only allowed for integral types.");
626 uint8_t(kFlags) & uint8_t(CTypeInfo::Flags::kIsRestrictedBit),
627 CTypeInfo::IsFloatingPointType(kType),
628 "kIsRestrictedBit is only allowed for floating point types.");
629
630 // Return the same type with the merged flags.
632 }
633
634 private:
635 template <typename... Rest>
636 static constexpr CTypeInfo::Flags MergeFlags(CTypeInfo::Flags flags,
637 Rest... rest) {
638 return CTypeInfo::Flags(uint8_t(flags) | uint8_t(MergeFlags(rest...)));
639 }
640 static constexpr CTypeInfo::Flags MergeFlags() { return CTypeInfo::Flags(0); }
641};
643namespace internal {
644template <typename RetBuilder, typename... ArgBuilders>
646 public:
647 explicit constexpr CFunctionBuilderWithFunction(const void* fn) : fn_(fn) {}
648
649 template <CTypeInfo::Flags... Flags>
650 constexpr auto Ret() {
652 CTypeInfoBuilder<typename RetBuilder::BaseType, Flags...>,
653 ArgBuilders...>(fn_);
655
656 template <unsigned int N, CTypeInfo::Flags... Flags>
657 constexpr auto Arg() {
658 // Return a copy of the builder with the Nth arg builder merged with
659 // template parameter pack Flags.
660 return ArgImpl<N, Flags...>(
661 std::make_index_sequence<sizeof...(ArgBuilders)>());
662 }
664 // Provided for testing purposes.
665 template <typename Ret, typename... Args>
666 auto Patch(Ret (*patching_func)(Args...)) {
667 static_assert(
668 sizeof...(Args) == sizeof...(ArgBuilders),
669 "The patching function must have the same number of arguments.");
670 fn_ = reinterpret_cast<void*>(patching_func);
671 return *this;
672 }
674 template <CFunctionInfo::Int64Representation Representation =
676 auto Build() {
677 static CFunctionInfoImpl<Representation, RetBuilder, ArgBuilders...>
678 instance;
679 return CFunction(fn_, &instance);
680 }
681
682 private:
683 template <bool Merge, unsigned int N, CTypeInfo::Flags... Flags>
684 struct GetArgBuilder;
685
686 // Returns the same ArgBuilder as the one at index N, including its flags.
687 // Flags in the template parameter pack are ignored.
688 template <unsigned int N, CTypeInfo::Flags... Flags>
689 struct GetArgBuilder<false, N, Flags...> {
690 using type = std::tuple_element_t<N, std::tuple<ArgBuilders...>>;
691 };
692
693 // Returns an ArgBuilder with the same base type as the one at index N,
694 // but merges the flags with the flags in the template parameter pack.
695 template <unsigned int N, CTypeInfo::Flags... Flags>
696 struct GetArgBuilder<true, N, Flags...> {
697 using type = CTypeInfoBuilder<
698 typename std::tuple_element_t<N, std::tuple<ArgBuilders...>>::BaseType,
699 std::tuple_element_t<N, std::tuple<ArgBuilders...>>::Build().GetFlags(),
700 Flags...>;
701 };
702
703 // Return a copy of the CFunctionBuilder, but merges the Flags on
704 // ArgBuilder index N with the new Flags passed in the template parameter
705 // pack.
706 template <unsigned int N, CTypeInfo::Flags... Flags, size_t... I>
707 constexpr auto ArgImpl(std::index_sequence<I...>) {
708 return CFunctionBuilderWithFunction<
709 RetBuilder, typename GetArgBuilder<N == I, I, Flags...>::type...>(fn_);
710 }
711
712 const void* fn_;
713};
715class CFunctionBuilder {
716 public:
717 constexpr CFunctionBuilder() {}
718
719 template <typename R, typename... Args>
720 constexpr auto Fn(R (*fn)(Args...)) {
723 reinterpret_cast<const void*>(fn));
724 }
725};
726
727} // namespace internal
728
729// static
730template <typename R, typename... Args>
731CFunction CFunction::ArgUnwrap<R (*)(Args...)>::Make(
732 R (*func)(Args...), CFunctionInfo::Int64Representation int64_rep) {
734 return internal::CFunctionBuilder().Fn(func).Build();
735 }
736 return internal::CFunctionBuilder()
737 .Fn(func)
738 .template Build<CFunctionInfo::Int64Representation::kBigInt>();
739}
740
741using CFunctionBuilder = internal::CFunctionBuilder;
742
743static constexpr CTypeInfo kTypeInfoInt32 = CTypeInfo(CTypeInfo::Type::kInt32);
744static constexpr CTypeInfo kTypeInfoFloat64 =
745 CTypeInfo(CTypeInfo::Type::kFloat64);
746
759template <CTypeInfo::Identifier type_info_id, typename T>
761 Local<Array> src, T* dst, uint32_t max_length);
762
763template <>
765TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<int32_t>::Build().GetId(),
766 int32_t>(Local<Array> src, int32_t* dst,
767 uint32_t max_length);
768
769template <>
771TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<uint32_t>::Build().GetId(),
772 uint32_t>(Local<Array> src, uint32_t* dst,
773 uint32_t max_length);
774
775template <>
777TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<float>::Build().GetId(),
778 float>(Local<Array> src, float* dst,
779 uint32_t max_length);
780
781template <>
783TryToCopyAndConvertArrayToCppBuffer<CTypeInfoBuilder<double>::Build().GetId(),
784 double>(Local<Array> src, double* dst,
785 uint32_t max_length);
786
789
790} // namespace v8
791
792#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:605
static constexpr CTypeInfo Build()
Definition: v8-fast-api-calls.h:609
T BaseType
Definition: v8-fast-api-calls.h:607
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-data.h:18
Definition: v8-isolate.h:298
Definition: v8-local-handle.h:366
Definition: v8-value.h:32
Definition: v8-fast-api-calls.h:642
auto Build()
Definition: v8-fast-api-calls.h:673
constexpr auto Ret()
Definition: v8-fast-api-calls.h:647
constexpr auto Arg()
Definition: v8-fast-api-calls.h:654
auto Patch(Ret(*patching_func)(Args...))
Definition: v8-fast-api-calls.h:663
Definition: v8-fast-api-calls.h:712
constexpr CFunctionBuilder()
Definition: v8-fast-api-calls.h:714
constexpr auto Fn(R(*fn)(Args...))
Definition: v8-fast-api-calls.h:717
Definition: v8-fast-api-calls.h:493
constexpr CFunctionInfoImpl()
Definition: v8-fast-api-calls.h:505
Definition: libplatform.h:15
constexpr v8::ExternalPointerTypeTag kFastAPIPointerTag
Definition: v8-fast-api-calls.h:784
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:738
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:470
static FastApiCallbackOptions CreateForTesting(Isolate *isolate)
Definition: v8-fast-api-calls.h:460
v8::Local< v8::Data > DataV2() const
Definition: v8-fast-api-calls.h:476
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:544
Definition: v8-fast-api-calls.h:529
Definition: v8-fast-api-calls.h:484
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:546
#define PRIMITIVE_C_TYPES(V)
Definition: v8-fast-api-calls.h:552
#define SPECIALIZE_GET_TYPE_INFO_HELPER_FOR(T, Enum)
Definition: v8-fast-api-calls.h:533
#define ALL_C_TYPES(V)
Definition: v8-fast-api-calls.h:564
#define STATIC_ASSERT_IMPLIES(COND, ASSERTION, MSG)
Definition: v8-fast-api-calls.h:599
#define V8_EXTERNAL_POINTER_TAG_COUNT
Definition: v8-internal.h:466
#define V8_EXPORT
Definition: v8config.h:874
#define V8_INLINE
Definition: v8config.h:518
#define V8_DEPRECATE_SOON(message)
Definition: v8config.h:631
#define END_ALLOW_USE_DEPRECATED()
Definition: v8config.h:651
#define V8_WARN_UNUSED_RESULT
Definition: v8config.h:688
#define V8_TRIVIAL_ABI
Definition: v8config.h:827
#define START_ALLOW_USE_DEPRECATED()
Definition: v8config.h:650