| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}__ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}__ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
+355
| // Copyright 2019-2026 the Deno authors. All rights reserved. MIT license. | ||
| //! Support for sharing an isolate between threads, one thread at a time, | ||
| //! via the `v8::Locker` API. | ||
| use std::marker::PhantomData; | ||
| use std::mem::ManuallyDrop; | ||
| use std::ops::Deref; | ||
| use std::ops::DerefMut; | ||
| use std::ptr::NonNull; | ||
| use std::sync::Arc; | ||
| use crate::Isolate; | ||
| use crate::IsolateHandle; | ||
| use crate::isolate::RealIsolate; | ||
| unsafe extern "C" { | ||
| fn v8__Locker__CONSTRUCT(buf: *mut RawLocker, isolate: *mut RealIsolate); | ||
| fn v8__Locker__DESTRUCT(this: *mut RawLocker); | ||
| pub(crate) fn v8__Locker__IsLocked(isolate: *const RealIsolate) -> bool; | ||
| fn v8__Unlocker__CONSTRUCT(buf: *mut RawUnlocker, isolate: *mut RealIsolate); | ||
| fn v8__Unlocker__DESTRUCT(this: *mut RawUnlocker); | ||
| fn v8__Isolate__Enter(isolate: *mut RealIsolate); | ||
| fn v8__Isolate__Exit(isolate: *mut RealIsolate); | ||
| fn v8__Isolate__TryGetCurrent() -> *mut RealIsolate; | ||
| } | ||
| /// Whether the current thread holds the `v8::Locker` for `isolate`. | ||
| /// | ||
| /// This asks V8 rather than shadowing the lock state in a thread-local. | ||
| /// A shadow would be a little cheaper on the `Global` clone/drop/eq/hash | ||
| /// path, but it has to stay correct in two places it is hard to | ||
| /// guarantee: it must be updated across [`Locker::unlock`] windows, and | ||
| /// any thread-local holding it is destructible, so a `Locker` or shared | ||
| /// `Global` living in a thread-local that was initialized *earlier* would | ||
| /// touch it from its destructor after it had already been torn down — | ||
| /// `LocalKey::with` panics there, and a panic in a TLS destructor aborts. | ||
| /// A false positive here would let `Global::drop` reset a cell without | ||
| /// the lock, so correctness wins over the FFI call. | ||
| pub(crate) fn thread_holds_lock(isolate: *mut RealIsolate) -> bool { | ||
| unsafe { v8__Locker__IsLocked(isolate) } | ||
| } | ||
| /// Raw storage for a `v8::Locker`. Its size is checked by a static_assert | ||
| /// in binding.cc. It is not address-sensitive (it holds two flags and an | ||
| /// isolate pointer), but it lives in a `Box` anyway so its address stays | ||
| /// stable for the C++ destructor no matter how the Rust guard moves. | ||
| #[repr(C)] | ||
| pub(crate) struct RawLocker([usize; 2]); | ||
| /// Raw storage for a `v8::Unlocker`. Size checked by a static_assert in | ||
| /// binding.cc. Boxed for the same reason as [`RawLocker`]. | ||
| #[repr(C)] | ||
| pub(crate) struct RawUnlocker([usize; 1]); | ||
| /// An isolate that can be used from multiple threads, one at a time. | ||
| /// | ||
| /// Created with [`crate::OwnedIsolate::try_into_shared`]. All access goes | ||
| /// through [`SharedIsolate::lock`], which acquires the isolate's | ||
| /// `v8::Locker`, enters the isolate on the current thread, and yields a | ||
| /// [`Locker`] guard that dereferences to [`Isolate`]. | ||
| /// | ||
| /// Limitations: | ||
| /// - [`crate::Weak`] handles are not supported on shared isolates, and an | ||
| /// isolate with live weaks or pending finalizers is rejected by conversion. | ||
| /// - Snapshot-creator isolates and isolates with a cppgc heap attached | ||
| /// are rejected by conversion. | ||
| /// - Opening a [`crate::Global`] into a plain reference is unsafe, and that | ||
| /// reference must remain on the current thread and not outlive the lock. | ||
| /// Prefer converting it to a [`crate::Local`] under a handle scope. Other | ||
| /// access, such as cloning, hashing, or comparing, also requires holding the | ||
| /// lock on the current thread. | ||
| /// | ||
| /// [`crate::Global`]s are `Send` and may be dropped on any thread at any time: | ||
| /// if the | ||
| /// dropping thread holds the lock its V8 cell is reset immediately. Otherwise | ||
| /// the reset is deferred until the next lock acquisition, [`Locker::unlock`], | ||
| /// [`Locker`] drop, or isolate teardown. Until then it remains a GC root and | ||
| /// may retain the JavaScript object graph it references. | ||
| /// | ||
| /// # Blocking under the lock | ||
| /// | ||
| /// The lock is held for as long as its [`Locker`] guard lives, and | ||
| /// [`SharedIsolate::lock`] has no timeout and no `try_lock`. Anything that | ||
| /// blocks while holding it — a Rust callback doing I/O, a long computation, | ||
| /// JS that parks — blocks *every* other thread that wants this isolate, and | ||
| /// a thread that blocks forever wedges the isolate permanently. | ||
| /// | ||
| /// Use [`Locker::unlock`] to release the lock around such work so other | ||
| /// threads can make progress in the meantime. | ||
| /// | ||
| /// # Cost | ||
| /// | ||
| /// [`SharedIsolate::lock`] is not uniformly cheap: its cost scales with how | ||
| /// often the *entering thread changes*. V8's `ThreadManager` archives an | ||
| /// isolate's per-thread state when a different thread takes the lock and | ||
| /// restores it on the way back in, so a sequence of locks from one thread is | ||
| /// far cheaper than the same sequence alternating between two. | ||
| /// | ||
| /// This matters for work-stealing executors, which are free to run each of | ||
| /// an isolate's turns on a different worker and so maximise the migration. | ||
| /// A measured case: an embedder serving a trivial request per lock lost | ||
| /// about 9% of its throughput moving from one worker thread to twelve, with | ||
| /// the *same* number of locks in both — the loss was migration alone. If an | ||
| /// embedder can keep consecutive locks of one isolate on one thread, or run | ||
| /// fewer workers, it is worth doing. | ||
| #[derive(Debug)] | ||
| pub struct SharedIsolate { | ||
| inner: Arc<SharedIsolateInner>, | ||
| } | ||
| #[derive(Debug)] | ||
| struct SharedIsolateInner { | ||
| cxx_isolate: NonNull<RealIsolate>, | ||
| isolate_handle: IsolateHandle, | ||
| } | ||
| // SAFETY: V8 access is serialized by `v8::Locker`; the only operation exposed | ||
| // without it is cloning the separately synchronized `IsolateHandle`. | ||
| unsafe impl Send for SharedIsolateInner {} | ||
| unsafe impl Sync for SharedIsolateInner {} | ||
| impl SharedIsolate { | ||
| pub(crate) fn new( | ||
| cxx_isolate: NonNull<RealIsolate>, | ||
| isolate_handle: IsolateHandle, | ||
| ) -> Self { | ||
| Self { | ||
| inner: Arc::new(SharedIsolateInner { | ||
| cxx_isolate, | ||
| isolate_handle, | ||
| }), | ||
| } | ||
| } | ||
| pub(crate) fn as_real_ptr(&self) -> *mut RealIsolate { | ||
| self.inner.cxx_isolate.as_ptr() | ||
| } | ||
| /// Acquire the isolate's lock and enter it on the current thread, | ||
| /// blocking until any other thread holding the lock releases it. | ||
| /// | ||
| /// # Panics | ||
| /// | ||
| /// Panics if the current thread already holds the lock. `v8::Locker` is | ||
| /// recursive, but two live guards would hand out aliasing `&mut Isolate` | ||
| /// references, so recursive locking is forbidden here. Also panics if a | ||
| /// different isolate is currently entered: permitting nested [`Locker`] | ||
| /// guards would make it possible to drop them out of order, which V8 cannot | ||
| /// recover from. | ||
| pub fn lock(&self) -> Locker<'_> { | ||
| Locker::new(self) | ||
| } | ||
| /// A handle usable from any thread without holding the lock, for | ||
| /// [`IsolateHandle::terminate_execution`] and | ||
| /// [`IsolateHandle::request_interrupt`]. | ||
| /// | ||
| /// Obtaining one through a [`Locker`] would require the very lock the | ||
| /// runaway thread is holding, so take it from here instead. | ||
| pub fn thread_safe_handle(&self) -> IsolateHandle { | ||
| self.inner.isolate_handle.clone() | ||
| } | ||
| } | ||
| impl Drop for SharedIsolateInner { | ||
| fn drop(&mut self) { | ||
| // Every Locker owns an Arc to this allocation. Forgetting a Locker therefore | ||
| // leaks the allocation and its still-entered V8 isolate instead of allowing | ||
| // this destructor to dispose an isolate that V8 still considers in use. | ||
| // With no Lockers left, other threads may still be dropping Globals: | ||
| // drain the deferred queue and close it under the lock, then tear down the | ||
| // same way `OwnedIsolate::drop` does. | ||
| unsafe { | ||
| let mut isolate = Isolate::from_non_null(self.cxx_isolate); | ||
| let ptr = self.cxx_isolate.as_ptr(); | ||
| let mut raw = Box::new(RawLocker([0; 2])); | ||
| v8__Locker__CONSTRUCT(&mut *raw, ptr); | ||
| isolate | ||
| .global_liveness() | ||
| .as_ref() | ||
| .close_deferred_global_resets(); | ||
| v8__Locker__DESTRUCT(&mut *raw); | ||
| let (annex_ptr, _create_param_allocations) = | ||
| isolate.prepare_annex_for_dispose(); | ||
| Isolate::run_remaining_guaranteed_finalizers(annex_ptr); | ||
| crate::Platform::notify_isolate_shutdown( | ||
| &crate::V8::get_current_platform(), | ||
| &isolate, | ||
| ); | ||
| isolate.dispose(); | ||
| Isolate::finish_annex_dispose(annex_ptr); | ||
| } | ||
| } | ||
| } | ||
| /// A guard that holds the `v8::Locker` for a [`SharedIsolate`] and keeps | ||
| /// the isolate entered on the current thread. Dereferences to [`Isolate`]; | ||
| /// construct scopes with e.g. `HandleScope::new(&mut *locker)`. | ||
| pub struct Locker<'s> { | ||
| raw: Box<RawLocker>, | ||
| cxx_isolate: NonNull<RealIsolate>, | ||
| // Dropped manually only after the C++ Locker is successfully destroyed. If | ||
| // cleanup panics first, retaining this Arc leaks the isolate rather than | ||
| // allowing its owner to dispose an isolate whose V8 lock is still held. | ||
| inner: ManuallyDrop<Arc<SharedIsolateInner>>, | ||
| _shared: PhantomData<&'s SharedIsolate>, | ||
| } | ||
| impl<'s> Locker<'s> { | ||
| fn new(shared: &'s SharedIsolate) -> Self { | ||
| let ptr = shared.as_real_ptr(); | ||
| unsafe { | ||
| assert!( | ||
| !thread_holds_lock(ptr), | ||
| "attempted to lock an isolate that is already locked by this thread" | ||
| ); | ||
| assert!( | ||
| v8__Isolate__TryGetCurrent().is_null(), | ||
| "attempted to lock a shared isolate while another isolate is entered" | ||
| ); | ||
| let mut raw = Box::new(RawLocker([0; 2])); | ||
| v8__Locker__CONSTRUCT(&mut *raw, ptr); | ||
| v8__Isolate__Enter(ptr); | ||
| let locker = Self { | ||
| raw, | ||
| cxx_isolate: shared.inner.cxx_isolate, | ||
| inner: ManuallyDrop::new(Arc::clone(&shared.inner)), | ||
| _shared: PhantomData, | ||
| }; | ||
| // Release Globals that were dropped by threads not holding the lock. | ||
| locker | ||
| .global_liveness() | ||
| .as_ref() | ||
| .maybe_drain_deferred_global_resets(); | ||
| locker | ||
| } | ||
| } | ||
| /// Release the isolate's lock for the duration of `f` so other threads | ||
| /// can lock and use the isolate, then reacquire it before returning. | ||
| /// | ||
| /// Wrap anything that blocks or runs long without needing the isolate — | ||
| /// I/O in a callback, waiting on a channel, a heavy pure-Rust | ||
| /// computation — so it doesn't hold every other thread off the isolate. | ||
| /// | ||
| /// The isolate must not be touched inside `f`. The `&mut self` borrow | ||
| /// enforces that for anything reached through this guard: scopes and | ||
| /// `&Isolate` references derived from it are already dead by the time | ||
| /// `unlock` can be called, and handle operations that would need the | ||
| /// lock (e.g. cloning a [`crate::Global`]) panic while it is released. | ||
| /// | ||
| /// Handles created before the call stay valid — `v8::Unlocker` archives | ||
| /// this thread's isolate state and restores it on the way back in — but | ||
| /// another thread may run JS and collect garbage in the window, so | ||
| /// nothing observed beforehand can be assumed unchanged afterwards. | ||
| /// | ||
| /// # Panics | ||
| /// | ||
| /// Panics if another isolate has been entered on top of this one, since | ||
| /// unlocking would then release the wrong isolate's hold on this thread, or | ||
| /// if `f` returns while an isolate it entered is still current. | ||
| pub fn unlock<R>(&mut self, f: impl FnOnce() -> R) -> R { | ||
| let ptr = self.cxx_isolate.as_ptr(); | ||
| unsafe { | ||
| assert!( | ||
| std::ptr::eq(ptr, v8__Isolate__TryGetCurrent()), | ||
| "Locker::unlock called while another isolate was entered on top of \ | ||
| this one" | ||
| ); | ||
| // Release what other threads queued while we held the lock; they | ||
| // can't do it themselves, and we're about to stop being able to. | ||
| self | ||
| .global_liveness() | ||
| .as_ref() | ||
| .maybe_drain_deferred_global_resets(); | ||
| } | ||
| unsafe { v8__Isolate__Exit(ptr) }; | ||
| let mut raw = Box::new(RawUnlocker([0; 1])); | ||
| // V8 requires the isolate to be exited before constructing an Unlocker. | ||
| // The guard destroys the Unlocker (reacquiring the lock) and then | ||
| // re-enters the isolate, including when `f` unwinds. | ||
| unsafe { v8__Unlocker__CONSTRUCT(&mut *raw, ptr) }; | ||
| let _relock = RelockGuard { | ||
| raw, | ||
| cxx_isolate: self.cxx_isolate, | ||
| }; | ||
| let result = f(); | ||
| // `result` was created after `_relock`, so if this assertion unwinds it is | ||
| // dropped first. That gives a returned OwnedIsolate or Locker a chance to | ||
| // exit cleanly before `_relock` restores this isolate. | ||
| assert!( | ||
| unsafe { v8__Isolate__TryGetCurrent().is_null() }, | ||
| "Locker::unlock closure returned while an isolate was still entered" | ||
| ); | ||
| result | ||
| } | ||
| } | ||
| /// Reacquires the lock and re-enters the isolate when the unlock window | ||
| /// ends, on the normal path and while unwinding alike. | ||
| struct RelockGuard { | ||
| raw: Box<RawUnlocker>, | ||
| cxx_isolate: NonNull<RealIsolate>, | ||
| } | ||
| impl Drop for RelockGuard { | ||
| fn drop(&mut self) { | ||
| unsafe { | ||
| v8__Unlocker__DESTRUCT(&mut *self.raw); | ||
| v8__Isolate__Enter(self.cxx_isolate.as_ptr()); | ||
| // Globals may have been dropped while the lock was released. This is a | ||
| // lock acquisition boundary just like `SharedIsolate::lock()`. | ||
| Isolate::from_non_null(self.cxx_isolate) | ||
| .global_liveness() | ||
| .as_ref() | ||
| .maybe_drain_deferred_global_resets(); | ||
| } | ||
| } | ||
| } | ||
| impl Drop for Locker<'_> { | ||
| fn drop(&mut self) { | ||
| unsafe { | ||
| // Final drain while we still hold the lock, so cells dropped by | ||
| // other threads during this lock don't sit in the queue (keeping | ||
| // their JS objects alive) until the next acquisition. | ||
| self | ||
| .global_liveness() | ||
| .as_ref() | ||
| .maybe_drain_deferred_global_resets(); | ||
| assert!( | ||
| std::ptr::eq(self.cxx_isolate.as_ptr(), v8__Isolate__TryGetCurrent()), | ||
| "Locker dropped while its isolate was not the entered one; lockers \ | ||
| must be dropped in reverse order of creation" | ||
| ); | ||
| v8__Isolate__Exit(self.cxx_isolate.as_ptr()); | ||
| v8__Locker__DESTRUCT(&mut *self.raw); | ||
| ManuallyDrop::drop(&mut self.inner); | ||
| } | ||
| } | ||
| } | ||
| impl Deref for Locker<'_> { | ||
| type Target = Isolate; | ||
| fn deref(&self) -> &Isolate { | ||
| unsafe { Isolate::from_raw_ref(&self.cxx_isolate) } | ||
| } | ||
| } | ||
| impl DerefMut for Locker<'_> { | ||
| fn deref_mut(&mut self) -> &mut Isolate { | ||
| unsafe { Isolate::from_raw_ref_mut(&mut self.cxx_isolate) } | ||
| } | ||
| } |
| // Copyright 2019-2026 the Deno authors. All rights reserved. MIT license. | ||
| // `Global<T>` deliberately does not implement `Borrow<T>`. `fn borrow(&self) | ||
| // -> &T` has nowhere to take proof that the caller may touch the isolate, and | ||
| // nowhere to tie the returned reference's lifetime to that proof — and since | ||
| // `Global` is `Send + Sync`, a `&Global<T>` can be on any thread. Use | ||
| // `Local::new(scope, &global)` instead. | ||
| use std::pin::pin; | ||
| pub fn main() { | ||
| let mut isolate = v8::Isolate::new(mock()); | ||
| let scope = pin!(v8::HandleScope::new(&mut isolate)); | ||
| let scope = scope.init(); | ||
| let local = v8::String::new(&scope, "x").unwrap(); | ||
| let global = v8::Global::new(&scope, local); | ||
| let _: &v8::String = std::borrow::Borrow::borrow(&global); | ||
| } | ||
| fn mock<T>() -> T { | ||
| unimplemented!() | ||
| } |
Sorry, the diff of this file is not supported yet
| // Copyright 2019-2026 the Deno authors. All rights reserved. MIT license. | ||
| // Opening a `Global<T>` into a plain `&T` requires an unsafe block because the | ||
| // caller must keep the isolate and any Locker alive and must not send the | ||
| // reference across threads. Use `Local::new(scope, &global)` instead when | ||
| // possible. | ||
| use std::pin::pin; | ||
| pub fn main() { | ||
| let mut isolate = v8::Isolate::new(mock()); | ||
| let global = { | ||
| let scope = pin!(v8::HandleScope::new(&mut isolate)); | ||
| let scope = scope.init(); | ||
| let local = v8::String::new(&scope, "x").unwrap(); | ||
| v8::Global::new(&scope, local) | ||
| }; | ||
| let _: &v8::String = global.open(&mut isolate); | ||
| } | ||
| fn mock<T>() -> T { | ||
| unimplemented!() | ||
| } |
Sorry, the diff of this file is not supported yet
| // Copyright 2019-2026 the Deno authors. All rights reserved. MIT license. | ||
| #[test] | ||
| fn dropping_conversion_error_while_unwinding_leaks_safely() { | ||
| v8::V8::set_flags_from_string("--no_freeze_flags_after_init"); | ||
| v8::V8::initialize_platform( | ||
| v8::new_unprotected_default_platform(0, false).make_shared(), | ||
| ); | ||
| v8::V8::initialize(); | ||
| let snapshot_creator = v8::Isolate::snapshot_creator(None, None); | ||
| let panic = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { | ||
| // `unwrap` begins unwinding and then drops the error. The retained snapshot | ||
| // creator cannot run `OwnedIsolate::drop`, so the error must leak it instead | ||
| // of causing a second panic and aborting the process. | ||
| let _ = unsafe { snapshot_creator.try_into_shared() }.unwrap(); | ||
| })); | ||
| assert!(panic.is_err()); | ||
| } |
| // Copyright 2019-2026 the Deno authors. All rights reserved. MIT license. | ||
| #[test] | ||
| fn dropping_shared_isolate_after_forgetting_locker_leaks_safely() { | ||
| v8::V8::set_flags_from_string("--no_freeze_flags_after_init"); | ||
| v8::V8::initialize_platform( | ||
| v8::new_unprotected_default_platform(0, false).make_shared(), | ||
| ); | ||
| v8::V8::initialize(); | ||
| let shared = unsafe { | ||
| v8::Isolate::new(Default::default()) | ||
| .try_into_shared() | ||
| .unwrap() | ||
| }; | ||
| let locker = shared.lock(); | ||
| std::mem::forget(locker); | ||
| // The leaked Locker owns the shared inner allocation. Dropping the public | ||
| // handle must therefore leak the entered isolate, not try to dispose it. | ||
| drop(shared); | ||
| } |
| { | ||
| "git": { | ||
| "sha1": "ca3b932d42fcc846b1310941b0ff8d1146fa30bb", | ||
| "sha1": "8149304f6924411df09a1917cd6de0fc90fa7fec", | ||
| "dirty": true | ||
@@ -5,0 +5,0 @@ }, |
+0
-8
@@ -405,7 +405,2 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. | ||
| gn_args.push(format!( | ||
| "rusty_v8_enable_simdutf={}", | ||
| env::var("CARGO_FEATURE_SIMDUTF").is_ok() | ||
| )); | ||
| // Fix GN's host_cpu detection when using x86_64 bins on Apple Silicon | ||
@@ -744,5 +739,2 @@ if cfg!(target_os = "macos") && cfg!(target_arch = "aarch64") { | ||
| } | ||
| if env::var("CARGO_FEATURE_SIMDUTF").is_ok() { | ||
| features.push_str("_simdutf"); | ||
| } | ||
| features | ||
@@ -749,0 +741,0 @@ } |
+1
-1
@@ -776,3 +776,3 @@ # This file is automatically @generated by Cargo. | ||
| name = "v8" | ||
| version = "152.0.0" | ||
| version = "152.1.0" | ||
| dependencies = [ | ||
@@ -779,0 +779,0 @@ "align-data", |
+9
-1
@@ -15,3 +15,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "v8" | ||
| version = "152.0.0" | ||
| version = "152.1.0" | ||
| authors = ["the Deno authors"] | ||
@@ -188,2 +188,10 @@ build = "build.rs" | ||
| [[test]] | ||
| name = "test_shared_isolate_conversion_error_drop" | ||
| path = "tests/test_shared_isolate_conversion_error_drop.rs" | ||
| [[test]] | ||
| name = "test_shared_isolate_leaked_locker" | ||
| path = "tests/test_shared_isolate_leaked_locker.rs" | ||
| [[test]] | ||
| name = "test_simdutf" | ||
@@ -190,0 +198,0 @@ path = "tests/test_simdutf.rs" |
+4
-3
@@ -51,5 +51,6 @@ # Rusty V8 Binding | ||
| Binaries builds are turned on by default: `cargo build` will initiate a download | ||
| from github to get the static lib. To disable this build using the | ||
| `V8_FROM_SOURCE` environmental variable. | ||
| Binary builds are the default: `cargo build` will initiate a download from | ||
| github to get the static lib. To build V8 from source instead, set the | ||
| `V8_FROM_SOURCE` environment variable to `1` (`true` and `yes` also work). Any | ||
| other value, or leaving it unset, uses the prebuilt lib. | ||
@@ -56,0 +57,0 @@ When making changes to rusty_v8 itself, it should be tested by build from |
@@ -6,2 +6,3 @@ // Copyright 2024 the Deno authors. All rights reserved. MIT license. | ||
| #include "support.h" | ||
| #include "v8-inspector-protocol.h" | ||
| #include "v8/third_party/inspector_protocol/crdtp/cbor.h" | ||
@@ -257,2 +258,9 @@ #include "v8/third_party/inspector_protocol/crdtp/dispatch.h" | ||
| std::vector<uint8_t>* v8_inspector__RemoteObject__toBytes( | ||
| const v8_inspector::protocol::Runtime::API::RemoteObject* self) { | ||
| auto* bytes = crdtp__vec_u8__new(); | ||
| self->AppendSerialized(bytes); | ||
| return bytes; | ||
| } | ||
| void crdtp__vec_u8__DELETE(std::vector<uint8_t>* self) { delete self; } | ||
@@ -259,0 +267,0 @@ |
+16
-16
@@ -211,4 +211,16 @@ // Copyright 2024 the Deno authors. All rights reserved. MIT license. | ||
| #[repr(C)] | ||
| struct CppVecU8(Opaque); | ||
| pub(crate) struct CppVecU8(Opaque); | ||
| impl CppVecU8 { | ||
| pub(crate) unsafe fn take_from_raw(ptr: *mut Self) -> Vec<u8> { | ||
| unsafe { | ||
| let len = crdtp__vec_u8__size(ptr); | ||
| let mut result = vec![0u8; len]; | ||
| crdtp__vec_u8__copy(ptr, result.as_mut_ptr()); | ||
| crdtp__vec_u8__DELETE(ptr); | ||
| result | ||
| } | ||
| } | ||
| } | ||
| #[repr(C)] | ||
@@ -229,7 +241,3 @@ struct RawSerializable(Opaque); | ||
| crdtp__Serializable__AppendSerialized(self.ptr, vec); | ||
| let len = crdtp__vec_u8__size(vec); | ||
| let mut result = vec![0u8; len]; | ||
| crdtp__vec_u8__copy(vec, result.as_mut_ptr()); | ||
| crdtp__vec_u8__DELETE(vec); | ||
| result | ||
| CppVecU8::take_from_raw(vec) | ||
| } | ||
@@ -630,7 +638,3 @@ } | ||
| if ok { | ||
| let len = crdtp__vec_u8__size(vec); | ||
| let mut result = vec![0u8; len]; | ||
| crdtp__vec_u8__copy(vec, result.as_mut_ptr()); | ||
| crdtp__vec_u8__DELETE(vec); | ||
| Some(result) | ||
| Some(CppVecU8::take_from_raw(vec)) | ||
| } else { | ||
@@ -649,7 +653,3 @@ crdtp__vec_u8__DELETE(vec); | ||
| if ok { | ||
| let len = crdtp__vec_u8__size(vec); | ||
| let mut result = vec![0u8; len]; | ||
| crdtp__vec_u8__copy(vec, result.as_mut_ptr()); | ||
| crdtp__vec_u8__DELETE(vec); | ||
| Some(result) | ||
| Some(CppVecU8::take_from_raw(vec)) | ||
| } else { | ||
@@ -656,0 +656,0 @@ crdtp__vec_u8__DELETE(vec); |
+192
-38
@@ -285,2 +285,31 @@ use std::borrow::Borrow; | ||
| /// `v8::Local::new(scope, global_handle)`. | ||
| /// | ||
| /// Dropping a `Global` belonging to a [`crate::SharedIsolate`] without holding | ||
| /// that isolate's [`crate::Locker`] defers resetting its V8 storage cell until | ||
| /// the next lock boundary or isolate teardown. Until then the handle remains a | ||
| /// GC root and may keep its JavaScript object graph alive. | ||
| /// | ||
| /// # Thread safety | ||
| /// | ||
| /// `Global<T>` is [`Send`] and [`Sync`], so the handle may be moved or shared | ||
| /// between threads. This does not make the V8 heap object itself concurrently | ||
| /// accessible. Cloning, hashing, creating a [`Local`], and comparisons that | ||
| /// may involve the same isolate touch V8: for a non-shared isolate they require | ||
| /// its home thread, and for a [`crate::SharedIsolate`] they require holding its | ||
| /// [`crate::Locker`] on the current thread. These operations panic when that | ||
| /// requirement is not met or when the host isolate has been disposed. Two | ||
| /// handles known to belong to different live isolates compare unequal without | ||
| /// accessing either isolate. Dropping a `Global` is allowed on any thread and | ||
| /// may defer resetting its V8 storage cell as described above. | ||
| /// | ||
| /// `Global<T>` deliberately does not implement [`std::borrow::Borrow<T>`]. | ||
| /// Such an impl could return a reference that outlives the isolate or the | ||
| /// `Locker` proving access to a shared isolate. Use [`Local::new`] under a | ||
| /// handle scope instead. As a consequence, a `HashMap<Global<T>, _>` cannot be | ||
| /// queried by `&T`; callers needing allocation-free borrowed lookup should use | ||
| /// an embedder-owned stable key rather than the V8 object reference. | ||
| /// | ||
| /// Opening a `Global` into a plain reference is unsafe because the reference | ||
| /// could outlive its isolate or cross threads. Prefer [`Local::new`] under a | ||
| /// handle scope instead. | ||
| #[derive(Debug)] | ||
@@ -293,2 +322,9 @@ pub struct Global<T> { | ||
| impl<T> Global<T> { | ||
| #[inline(always)] | ||
| fn assert_access_allowed(&self) { | ||
| unsafe { | ||
| self.isolate_liveness.as_ref().assert_access_allowed(); | ||
| } | ||
| } | ||
| /// Construct a new Global from an existing Handle. | ||
@@ -308,5 +344,11 @@ #[inline(always)] | ||
| unsafe { | ||
| let isolate_liveness = (*isolate).global_liveness(); | ||
| // Cheap checkpoint (a relaxed load when empty) so cells dropped by | ||
| // threads that couldn't touch the isolate don't pin their JS | ||
| // objects indefinitely on isolates that are never locked. | ||
| isolate_liveness | ||
| .as_ref() | ||
| .maybe_drain_deferred_global_resets(); | ||
| let data = v8__Global__New((*isolate).as_real_ptr(), data) as *const T; | ||
| let data = NonNull::new_unchecked(data as *mut _); | ||
| let isolate_liveness = (*isolate).global_liveness(); | ||
| Self { | ||
@@ -343,5 +385,26 @@ data, | ||
| /// Returns a reference to the V8 heap object represented by this handle. | ||
| /// The handle is not cloned or converted to a [`Local`]. | ||
| /// | ||
| /// Prefer [`Local::new`] whenever possible. Unlike this function, a | ||
| /// [`Local`]'s lifetime is tied to its handle scope. | ||
| /// | ||
| /// # Safety | ||
| /// | ||
| /// For the entire lifetime of the returned reference, `isolate` must remain | ||
| /// alive and the current thread must remain permitted to access it. If the | ||
| /// isolate is shared, its [`crate::Locker`] must remain held on the current | ||
| /// thread. The reference must never be sent to or accessed from another | ||
| /// thread. | ||
| /// | ||
| /// # Panics | ||
| /// | ||
| /// This function panics if the handle is not hosted by `isolate`, if the | ||
| /// isolate has been disposed, or if the current thread is not permitted to | ||
| /// access the isolate. | ||
| #[inline(always)] | ||
| pub fn open<'a>(&'a self, scope: &mut Isolate) -> &'a T { | ||
| Handle::open(self, scope) | ||
| pub unsafe fn open<'a>(&'a self, isolate: &mut Isolate) -> &'a T { | ||
| self.assert_access_allowed(); | ||
| self.get_handle_host().assert_match_isolate(isolate); | ||
| unsafe { &*self.data.as_ptr() } | ||
| } | ||
@@ -357,4 +420,14 @@ | ||
| // A `Global` only touches V8 through methods that either take a scope or | ||
| // `&Isolate` argument (obtainable only on the isolate's thread or under | ||
| // its Locker), or that are guarded through `IsolateLiveness`: `clone`, | ||
| // `eq` and `hash` assert the current thread may touch the isolate, and | ||
| // `drop` releases the cell immediately when it may, deferring to the | ||
| // liveness queue otherwise. | ||
| unsafe impl<T> Send for Global<T> {} | ||
| unsafe impl<T> Sync for Global<T> {} | ||
| impl<T> Clone for Global<T> { | ||
| fn clone(&self) -> Self { | ||
| self.assert_access_allowed(); | ||
| let HandleInfo { data, host } = self.get_handle_info(); | ||
@@ -369,8 +442,15 @@ let mut isolate = unsafe { Isolate::from_non_null(host.get_isolate()) }; | ||
| unsafe { | ||
| if self.isolate_liveness.as_ref().get_isolate_ptr().is_null() { | ||
| let liveness = self.isolate_liveness.as_ref(); | ||
| if liveness.get_isolate_ptr().is_null() { | ||
| // This `Global` handle is associated with an `Isolate` that has already | ||
| // been disposed. | ||
| } else { | ||
| } else if !liveness.is_shared() && liveness.on_home_thread() { | ||
| // Destroy the storage cell that contains the contents of this Global. | ||
| v8__Global__Reset(self.data.cast().as_ptr()); | ||
| liveness.maybe_drain_deferred_global_resets(); | ||
| } else { | ||
| // Another thread may own the isolate right now; release the cell | ||
| // immediately if we may touch it, otherwise defer to the next | ||
| // lock acquisition or isolate teardown. | ||
| liveness.reset_or_defer_global(self.data.cast()); | ||
| } | ||
@@ -395,4 +475,4 @@ } | ||
| /// isolate associated with the handle (for [`Local`], the current isolate; | ||
| /// for [`Global`], the isolate you would pass to the [`Global::open()`] | ||
| /// method). | ||
| /// for [`Global`], the isolate you would pass to the unsafe | ||
| /// [`Global::open()`] method). | ||
| #[inline(always)] | ||
@@ -413,15 +493,4 @@ pub unsafe fn new(reference: &'a T, isolate: &mut Isolate) -> Self { | ||
| /// Returns a reference to the V8 heap object that this handle represents. | ||
| /// The handle does not get cloned, nor is it converted to a `Local` handle. | ||
| /// | ||
| /// # Panics | ||
| /// | ||
| /// This function panics in the following situations: | ||
| /// - The handle is not hosted by the specified Isolate. | ||
| /// - The Isolate that hosts this handle has been disposed. | ||
| fn open<'a>(&'a self, isolate: &mut Isolate) -> &'a Self::Data { | ||
| let HandleInfo { data, host } = self.get_handle_info(); | ||
| host.assert_match_isolate(isolate); | ||
| unsafe { &*data.as_ptr() } | ||
| } | ||
| #[doc(hidden)] | ||
| fn assert_safe_to_access(&self) {} | ||
@@ -437,7 +506,15 @@ /// Reads the inner value contained in this handle, _without_ verifying that | ||
| /// | ||
| /// For the entire lifetime of the returned reference, its handle and host | ||
| /// isolate must remain alive and the current thread must remain permitted to | ||
| /// access that isolate. If this is a [`Global`] belonging to a shared isolate, | ||
| /// its [`crate::Locker`] must remain held on the current thread. The reference | ||
| /// must never be sent to or accessed from another thread. | ||
| /// | ||
| /// # Panics | ||
| /// | ||
| /// This function panics if the `Isolate` that hosts the handle has been | ||
| /// disposed. | ||
| /// disposed or, for a [`Global`], if the current thread is not permitted to | ||
| /// access it. | ||
| unsafe fn get_unchecked(&self) -> &Self::Data { | ||
| self.assert_safe_to_access(); | ||
| let HandleInfo { data, host } = self.get_handle_info(); | ||
@@ -470,2 +547,5 @@ if let HandleHost::DisposedIsolate = host { | ||
| } | ||
| fn assert_safe_to_access(&self) { | ||
| self.assert_access_allowed(); | ||
| } | ||
| } | ||
@@ -478,2 +558,5 @@ | ||
| } | ||
| fn assert_safe_to_access(&self) { | ||
| self.assert_access_allowed(); | ||
| } | ||
| } | ||
@@ -507,11 +590,10 @@ | ||
| impl<T> Borrow<T> for Global<T> { | ||
| fn borrow(&self) -> &T { | ||
| let HandleInfo { data, host } = self.get_handle_info(); | ||
| if let HandleHost::DisposedIsolate = host { | ||
| panic!("attempt to access Handle hosted by disposed Isolate"); | ||
| } | ||
| unsafe { &*data.as_ptr() } | ||
| } | ||
| } | ||
| // `Borrow<T> for Global<T>` is deliberately absent. `fn borrow(&self) -> &T` | ||
| // has nowhere to take proof that the caller may touch the isolate, and | ||
| // nowhere to tie the returned reference's lifetime to that proof: any check | ||
| // it made would expire while the `&T` it handed out stayed alive. Heap-object | ||
| // wrappers are `!Sync`, which prevents moving that reference to another | ||
| // thread, but does not prevent it from outliving a Locker or the isolate. Use | ||
| // `Local::new(scope, &global)` instead — a `Local` is bound to a scope, which | ||
| // is bound to the isolate. | ||
@@ -529,8 +611,9 @@ impl<T> Eq for Local<'_, T> where T: Eq {} | ||
| fn hash<H: Hasher>(&self, state: &mut H) { | ||
| unsafe { | ||
| if self.isolate_liveness.as_ref().get_isolate_ptr().is_null() { | ||
| panic!("can't hash Global after its host Isolate has been disposed"); | ||
| } | ||
| self.data.as_ref().hash(state); | ||
| // Hashing may call into V8 (e.g. `Object::GetIdentityHash`, which can | ||
| // mutate the object), so it needs the same gate as any other access. | ||
| if unsafe { self.isolate_liveness.as_ref().get_isolate_ptr().is_null() } { | ||
| panic!("can't hash Global after its host Isolate has been disposed"); | ||
| } | ||
| self.assert_access_allowed(); | ||
| unsafe { self.data.as_ref().hash(state) } | ||
| } | ||
@@ -546,2 +629,7 @@ } | ||
| let i2 = other.get_handle_info(); | ||
| if i1.host.are_different_live_isolates(i2.host) { | ||
| return false; | ||
| } | ||
| self.assert_safe_to_access(); | ||
| other.assert_safe_to_access(); | ||
| i1.host.match_host(i2.host, None) | ||
@@ -559,4 +647,16 @@ && unsafe { i1.data.as_ref() == i2.data.as_ref() } | ||
| let i2 = other.get_handle_info(); | ||
| i1.host.match_host(i2.host, None) | ||
| && unsafe { i1.data.as_ref() == i2.data.as_ref() } | ||
| // Distinct live isolates cannot contain the same V8 object. This check | ||
| // does not touch either isolate, so preserve the historical `false` | ||
| // result even if one Global is currently off its home/Locker thread. | ||
| if i1.host.are_different_live_isolates(i2.host) { | ||
| return false; | ||
| } | ||
| self.assert_safe_to_access(); | ||
| other.assert_safe_to_access(); | ||
| if !i1.host.match_host(i2.host, None) { | ||
| return false; | ||
| } | ||
| // Comparison calls into V8 (e.g. `Value::SameValue`); both operands | ||
| // were gated by `assert_safe_to_access` above. | ||
| unsafe { i1.data.as_ref() == i2.data.as_ref() } | ||
| } | ||
@@ -603,2 +703,9 @@ } | ||
| impl HandleHost { | ||
| fn are_different_live_isolates(self, other: Self) -> bool { | ||
| matches!( | ||
| (self, other), | ||
| (Self::Isolate(left), Self::Isolate(right)) if left != right | ||
| ) | ||
| } | ||
| /// Compares two `HandleHost` values, returning `true` if they refer to the | ||
@@ -723,2 +830,3 @@ /// same `Isolate`, or `false` if they refer to different isolates. | ||
| host.assert_match_isolate(isolate); | ||
| Self::assert_supported(isolate); | ||
| let finalizer_id = isolate | ||
@@ -751,2 +859,3 @@ .get_finalizer_map_mut() | ||
| host.assert_match_isolate(isolate); | ||
| Self::assert_supported(isolate); | ||
| let finalizer_id = isolate | ||
@@ -763,2 +872,4 @@ .get_finalizer_map_mut() | ||
| ) -> Self { | ||
| Self::assert_supported(isolate); | ||
| unsafe { *(*isolate).live_weak_count_mut() += 1 }; | ||
| let weak_data = Box::new(WeakData { | ||
@@ -787,2 +898,12 @@ pointer: Default::default(), | ||
| fn assert_supported(isolate: *mut Isolate) { | ||
| // Weak callbacks fire during GC on whichever thread holds a shared | ||
| // isolate's lock, racing the `WeakData` owned by this (non-Send) | ||
| // handle on its home thread. | ||
| assert!( | ||
| !unsafe { (*isolate).global_liveness().as_ref() }.is_shared(), | ||
| "v8::Weak is not supported on shared isolates" | ||
| ); | ||
| } | ||
| /// Creates a new empty handle, identical to one for an object that has | ||
@@ -830,2 +951,3 @@ /// already been GC'd. | ||
| let mut isolate = unsafe { Isolate::from_raw_ptr(isolate_ptr) }; | ||
| Self::assert_supported(&mut isolate); | ||
| let finalizer_id = finalizer | ||
@@ -849,2 +971,6 @@ .map(|finalizer| isolate.get_finalizer_map_mut().add(finalizer)); | ||
| /// was created. | ||
| /// | ||
| /// # Panics | ||
| /// | ||
| /// Panics if called with `Some` for a shared isolate. | ||
| pub unsafe fn from_raw( | ||
@@ -854,2 +980,5 @@ isolate: &mut Isolate, | ||
| ) -> Self { | ||
| if data.is_some() { | ||
| Self::assert_supported(isolate); | ||
| } | ||
| Weak { | ||
@@ -889,3 +1018,13 @@ data: data.map(|raw| unsafe { Box::from_raw(raw.cast().as_ptr()) }), | ||
| // If the pointer is None and we're not waiting for the second pass, | ||
| // drop the box and return None. | ||
| // drop the box and release its count. A `Some(raw)` return keeps the | ||
| // count until `from_raw` re-adopts the box and the resulting `Weak` | ||
| // is dropped; leaking the raw pointer conservatively keeps sharing | ||
| // disabled. | ||
| // SAFETY: we're in the isolate's thread because `Weak` isn't Send or | ||
| // Sync. | ||
| let isolate_ptr = unsafe { self.isolate_handle.get_isolate_ptr() }; | ||
| if !isolate_ptr.is_null() { | ||
| let mut isolate = unsafe { Isolate::from_raw_ptr(isolate_ptr) }; | ||
| isolate.release_live_weak(); | ||
| } | ||
| None | ||
@@ -1019,2 +1158,13 @@ } else { | ||
| fn drop(&mut self) { | ||
| // `data` is `Some` iff this handle was created through `new_raw` and | ||
| // thus counted. SAFETY: we're in the isolate's thread because `Weak` | ||
| // isn't Send or Sync. | ||
| if self.data.is_some() { | ||
| let isolate_ptr = unsafe { self.isolate_handle.get_isolate_ptr() }; | ||
| if !isolate_ptr.is_null() { | ||
| let mut isolate = unsafe { Isolate::from_raw_ptr(isolate_ptr) }; | ||
| isolate.release_live_weak(); | ||
| } | ||
| } | ||
| // Returns whether the finalizer existed. | ||
@@ -1131,2 +1281,6 @@ let remove_finalizer = |finalizer_id: Option<FinalizerId>| -> bool { | ||
| impl FinalizerMap { | ||
| pub(crate) fn is_empty(&self) -> bool { | ||
| self.map.is_empty() | ||
| } | ||
| fn add(&mut self, finalizer: FinalizerCallback) -> FinalizerId { | ||
@@ -1133,0 +1287,0 @@ let id = self.next_id; |
+269
-0
@@ -16,7 +16,10 @@ // Copyright 2019-2021 the Deno authors. All rights reserved. MIT license. | ||
| use crate::CallbackScope; | ||
| use crate::Context; | ||
| use crate::Isolate; | ||
| use crate::Local; | ||
| use crate::PinScope; | ||
| use crate::StackTrace; | ||
| use crate::Value; | ||
| use crate::crdtp::CppVecU8; | ||
| use crate::isolate::RealIsolate; | ||
@@ -31,2 +34,3 @@ use crate::support::CxxVTable; | ||
| use std::fmt::{self, Debug, Formatter}; | ||
| use std::pin::pin; | ||
@@ -85,2 +89,17 @@ unsafe extern "C" { | ||
| ); | ||
| fn v8_inspector__V8InspectorSession__releaseObjectGroup( | ||
| session: *mut RawV8InspectorSession, | ||
| object_group: StringView, | ||
| ); | ||
| fn v8_inspector__V8InspectorSession__wrapObject( | ||
| session: *mut RawV8InspectorSession, | ||
| context: *const Context, | ||
| value: *const Value, | ||
| object_group: StringView, | ||
| generate_preview: bool, | ||
| ) -> *mut RawRemoteObject; | ||
| fn v8_inspector__RemoteObject__DELETE(this: *mut RawRemoteObject); | ||
| fn v8_inspector__RemoteObject__toBytes( | ||
| this: *const RawRemoteObject, | ||
| ) -> *mut CppVecU8; | ||
| fn v8_inspector__V8InspectorSession__schedulePauseOnNextStatement( | ||
@@ -97,2 +116,12 @@ session: *mut RawV8InspectorSession, | ||
| ) -> bool; | ||
| fn v8_inspector__V8InspectorSession__Inspectable__NEW( | ||
| rust_impl: *mut c_void, | ||
| ) -> *mut RawInspectable; | ||
| fn v8_inspector__V8InspectorSession__Inspectable__DELETE( | ||
| inspectable: *mut RawInspectable, | ||
| ); | ||
| fn v8_inspector__V8InspectorSession__addInspectedObject( | ||
| session: *mut RawV8InspectorSession, | ||
| inspectable: *mut RawInspectable, | ||
| ); | ||
@@ -276,2 +305,38 @@ fn v8_inspector__StringBuffer__DELETE(this: *mut StringBuffer); | ||
| #[unsafe(no_mangle)] | ||
| unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__valueSubtype( | ||
| this: *mut RawV8InspectorClient, | ||
| context: Local<Context>, | ||
| value: Local<Value>, | ||
| ) -> *mut StringBuffer { | ||
| let scope = pin!(unsafe { CallbackScope::new(context) }); | ||
| let mut scope = scope.init(); | ||
| unsafe { | ||
| V8InspectorClientHeap::from_raw(this) | ||
| .imp | ||
| .value_subtype(&mut scope, value) | ||
| .and_then(|mut v| v.take()) | ||
| .map(|r| r.into_raw()) | ||
| .unwrap_or(std::ptr::null_mut()) | ||
| } | ||
| } | ||
| #[unsafe(no_mangle)] | ||
| unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__descriptionForValueSubtype( | ||
| this: *mut RawV8InspectorClient, | ||
| context: Local<Context>, | ||
| value: Local<Value>, | ||
| ) -> *mut StringBuffer { | ||
| let scope = pin!(unsafe { CallbackScope::new(context) }); | ||
| let mut scope = scope.init(); | ||
| unsafe { | ||
| V8InspectorClientHeap::from_raw(this) | ||
| .imp | ||
| .description_for_value_subtype(&mut scope, value) | ||
| .and_then(|mut v| v.take()) | ||
| .map(|r| r.into_raw()) | ||
| .unwrap_or(std::ptr::null_mut()) | ||
| } | ||
| } | ||
| #[unsafe(no_mangle)] | ||
| unsafe extern "C" fn v8_inspector__V8InspectorClient__BASE__ensureDefaultContextInGroup( | ||
@@ -537,2 +602,38 @@ this: *mut RawV8InspectorClient, | ||
| /// Returns a custom Chrome DevTools Protocol `Runtime.RemoteObject` subtype | ||
| /// for `value`. Use one of the protocol's defined subtype enum values. | ||
| /// Returning `Some` causes V8 to call | ||
| /// [`Self::description_for_value_subtype`]. | ||
| /// | ||
| /// The callback scope uses the isolate's current context as a best-effort | ||
| /// context; it is not necessarily the context in which `value` originated. | ||
| /// If the isolate has no current context, V8 skips this callback entirely. | ||
| /// This callback runs while the inspector is constructing a value mirror. | ||
| /// Operations such as property access can execute JavaScript through getters | ||
| /// or proxies, so wrap them in a [`crate::TryCatch`] to avoid leaving a | ||
| /// pending exception in the inspector's mirror-building path. | ||
| fn value_subtype<'s>( | ||
| &self, | ||
| scope: &mut PinScope<'s, '_>, | ||
| value: Local<'s, Value>, | ||
| ) -> Option<UniquePtr<StringBuffer>> { | ||
| None | ||
| } | ||
| /// Returns the description for a value whose custom subtype was returned by | ||
| /// [`Self::value_subtype`]. Returning `None` makes V8 fall back to the default | ||
| /// object mirror, which also discards the custom subtype unless it is | ||
| /// `"error"` or `"array"`. | ||
| /// | ||
| /// Like [`Self::value_subtype`], this callback runs while the inspector is | ||
| /// constructing a value mirror. Wrap operations that can execute JavaScript | ||
| /// in a [`crate::TryCatch`] so an exception does not remain pending. | ||
| fn description_for_value_subtype<'s>( | ||
| &self, | ||
| scope: &mut PinScope<'s, '_>, | ||
| value: Local<'s, Value>, | ||
| ) -> Option<UniquePtr<StringBuffer>> { | ||
| None | ||
| } | ||
| fn ensure_default_context_in_group( | ||
@@ -606,2 +707,85 @@ &self, | ||
| #[derive(Debug)] | ||
| struct RawInspectable(Opaque); | ||
| impl Drop for RawInspectable { | ||
| fn drop(&mut self) { | ||
| unsafe { | ||
| v8_inspector__V8InspectorSession__Inspectable__DELETE(self); | ||
| } | ||
| } | ||
| } | ||
| // A trait object is a fat pointer, so box it once more before passing it through | ||
| // the FFI as a thin `*mut c_void`. | ||
| struct InspectableData { | ||
| imp: Box<dyn InspectableImpl>, | ||
| } | ||
| /// Supplies the value of an object added to the inspector's `$0` through `$4` | ||
| /// history. | ||
| pub trait InspectableImpl { | ||
| /// Called by the inspector from within a V8 callback when the console | ||
| /// dereferences one of `$0` through `$4`. | ||
| /// | ||
| /// There is no way to return an empty handle; if no value is available, | ||
| /// return `undefined`. | ||
| fn get<'s>( | ||
| &self, | ||
| scope: &mut PinScope<'s, '_>, | ||
| context: Local<'s, Context>, | ||
| ) -> Local<'s, Value>; | ||
| } | ||
| /// An object that can be added to an inspector session's `$0` through `$4` | ||
| /// history. | ||
| pub struct Inspectable { | ||
| raw: UniqueRef<RawInspectable>, | ||
| } | ||
| impl Inspectable { | ||
| pub fn new(imp: Box<dyn InspectableImpl>) -> Self { | ||
| let data = Box::into_raw(Box::new(InspectableData { imp })).cast(); | ||
| let raw = unsafe { | ||
| UniqueRef::from_raw(v8_inspector__V8InspectorSession__Inspectable__NEW( | ||
| data, | ||
| )) | ||
| }; | ||
| Self { raw } | ||
| } | ||
| } | ||
| impl Debug for Inspectable { | ||
| fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { | ||
| f.debug_struct("Inspectable").finish() | ||
| } | ||
| } | ||
| #[unsafe(no_mangle)] | ||
| unsafe extern "C" fn v8_inspector__V8InspectorSession__Inspectable__BASE__get( | ||
| rust_impl: *mut c_void, | ||
| context: Local<Context>, | ||
| ) -> *const Value { | ||
| let data = unsafe { &*rust_impl.cast::<InspectableData>() }; | ||
| // SAFETY: `CallbackScope::new(context)` must not open its own HandleScope. | ||
| // `NewCallbackScope for Local<Context>` has `NEEDS_SCOPE == false`, and | ||
| // `make_new_callback_scope` constructs it with `needs_scope == false`. The | ||
| // handle returned here is allocated in the EscapableHandleScope opened by | ||
| // the C++ shim and escaped there. If Rust opens its own HandleScope, that | ||
| // scope is destroyed before C++ escapes the handle, causing a use-after-free. | ||
| let scope = pin!(unsafe { CallbackScope::new(context) }); | ||
| let mut scope = scope.init(); | ||
| data.imp.get(&mut scope, context).as_non_null().as_ptr() | ||
| } | ||
| #[unsafe(no_mangle)] | ||
| unsafe extern "C" fn v8_inspector__V8InspectorSession__Inspectable__BASE__DROP( | ||
| rust_impl: *mut c_void, | ||
| ) { | ||
| unsafe { | ||
| drop(Box::from_raw(rust_impl.cast::<InspectableData>())); | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RawV8InspectorSession(Opaque); | ||
@@ -630,2 +814,46 @@ | ||
| pub fn release_object_group(&self, object_group: StringView) { | ||
| unsafe { | ||
| v8_inspector__V8InspectorSession__releaseObjectGroup( | ||
| self.raw.as_ptr(), | ||
| object_group, | ||
| ); | ||
| } | ||
| } | ||
| /// Wraps a V8 value in an Inspector `Runtime.RemoteObject`. | ||
| /// | ||
| /// With `generate_preview == false`, V8 uses `kIdOnly`: object results still | ||
| /// include metadata such as `className` and `description`, but no property | ||
| /// preview. With `true`, V8 uses `kPreview`, which additionally includes a | ||
| /// property preview. | ||
| /// | ||
| /// `context` is used only to obtain an execution-context ID and look up the | ||
| /// corresponding `InspectedContext` in this session's context group. The | ||
| /// selected `InjectedScript` wraps `value` in that inspected context's stored | ||
| /// V8 context. Returns `None` if no matching inspected context is registered, | ||
| /// for example before `V8Inspector::context_created`. | ||
| /// | ||
| /// `_scope` is intentionally unused by Rust; borrowing it keeps the caller's | ||
| /// V8 `HandleScope` alive while `ValueMirror::create` allocates local handles. | ||
| pub fn wrap_object<'s>( | ||
| &self, | ||
| _scope: &mut PinScope<'s, '_>, | ||
| context: Local<'s, Context>, | ||
| value: Local<'s, Value>, | ||
| object_group: StringView, | ||
| generate_preview: bool, | ||
| ) -> Option<RemoteObject> { | ||
| unsafe { | ||
| UniqueRef::try_from_raw(v8_inspector__V8InspectorSession__wrapObject( | ||
| self.raw.as_ptr(), | ||
| &*context, | ||
| &*value, | ||
| object_group, | ||
| generate_preview, | ||
| )) | ||
| .map(|raw| RemoteObject { raw }) | ||
| } | ||
| } | ||
| pub fn schedule_pause_on_next_statement( | ||
@@ -654,2 +882,11 @@ &self, | ||
| } | ||
| pub fn add_inspected_object(&self, inspectable: Inspectable) { | ||
| unsafe { | ||
| v8_inspector__V8InspectorSession__addInspectedObject( | ||
| self.raw.as_ptr(), | ||
| inspectable.raw.into_raw(), | ||
| ); | ||
| } | ||
| } | ||
| } | ||
@@ -663,2 +900,34 @@ | ||
| /// An opaque, owned Inspector `Runtime.RemoteObject`. | ||
| pub struct RemoteObject { | ||
| raw: UniqueRef<RawRemoteObject>, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| struct RawRemoteObject(Opaque); | ||
| impl RemoteObject { | ||
| /// Serializes this remote object to its CRDTP/CBOR representation. | ||
| pub fn to_bytes(&self) -> Vec<u8> { | ||
| unsafe { | ||
| CppVecU8::take_from_raw(v8_inspector__RemoteObject__toBytes( | ||
| self.raw.as_ptr(), | ||
| )) | ||
| } | ||
| } | ||
| } | ||
| impl Debug for RemoteObject { | ||
| fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { | ||
| f.debug_struct("RemoteObject").finish() | ||
| } | ||
| } | ||
| impl Drop for RawRemoteObject { | ||
| fn drop(&mut self) { | ||
| unsafe { v8_inspector__RemoteObject__DELETE(self) } | ||
| } | ||
| } | ||
| // TODO: in C++, this class is intended to be user-extensible, just like | ||
@@ -665,0 +934,0 @@ // like `Task`, `Client`, `Channel`. In Rust this would ideally also be the |
+5
-1
@@ -53,2 +53,3 @@ // Copyright 2019-2021 the Deno authors. All rights reserved. MIT license. | ||
| mod isolate_create_params; | ||
| mod locker; | ||
| mod microtask; | ||
@@ -91,3 +92,2 @@ mod module; | ||
| pub mod script_compiler; | ||
| #[cfg(feature = "simdutf")] | ||
| pub mod simdutf; | ||
@@ -121,2 +121,4 @@ // This module is intentionally named "V8" rather than "v8" to match the | ||
| pub use isolate::HostInitializeImportMetaObjectCallback; | ||
| pub use isolate::IntoSharedError; | ||
| pub use isolate::IntoSharedErrorKind; | ||
| pub use isolate::Isolate; | ||
@@ -142,2 +144,4 @@ pub use isolate::IsolateHandle; | ||
| pub use isolate_create_params::CreateParams; | ||
| pub use locker::Locker; | ||
| pub use locker::SharedIsolate; | ||
| pub use microtask::MicrotaskQueue; | ||
@@ -144,0 +148,0 @@ pub use microtask::MicrotaskQueueHandle; |
+148
-2
@@ -261,2 +261,17 @@ use crate::AccessorConfiguration; | ||
| fn v8__Object__IsApiWrapper(this: *const Object) -> bool; | ||
| fn v8__Object__IsCallable(this: *const Object) -> bool; | ||
| fn v8__Object__IsConstructor(this: *const Object) -> bool; | ||
| fn v8__Object__CallAsFunction( | ||
| this: *const Object, | ||
| context: *const Context, | ||
| recv: *const Value, | ||
| argc: int, | ||
| argv: *const *const Value, | ||
| ) -> *const Value; | ||
| fn v8__Object__CallAsConstructor( | ||
| this: *const Object, | ||
| context: *const Context, | ||
| argc: int, | ||
| argv: *const *const Value, | ||
| ) -> *const Value; | ||
@@ -1107,2 +1122,134 @@ fn v8__Array__New(isolate: *mut RealIsolate, length: int) -> *const Array; | ||
| } | ||
| /// When this Object is callable, this method returns `true`. | ||
| /// | ||
| /// Certain exotic objects may be callable despite not being | ||
| /// [`Function`](crate::Function)s, such as [`Proxy`](crate::Proxy), or other | ||
| /// objects with a `[[Call]]` internal method. Callable objects can be created | ||
| /// via | ||
| /// [`ObjectTemplate::set_call_as_function_handler`](crate::ObjectTemplate::set_call_as_function_handler). | ||
| #[must_use = "this is a pure method"] | ||
| #[inline(always)] | ||
| pub fn is_callable(&self) -> bool { | ||
| unsafe { v8__Object__IsCallable(self) } | ||
| } | ||
| /// When this Object can be called as a constructor, this method returns | ||
| /// `true`. | ||
| #[must_use = "this is a pure method"] | ||
| #[inline(always)] | ||
| pub fn is_constructor(&self) -> bool { | ||
| unsafe { v8__Object__IsConstructor(self) } | ||
| } | ||
| /// Calls the [`Object`] as a function with the provided `this` argument and | ||
| /// arguments. | ||
| /// | ||
| /// For more information, see [`Object::is_callable()`]. | ||
| #[inline] | ||
| pub fn call_as_function<'s>( | ||
| &self, | ||
| scope: &PinScope<'s, '_>, | ||
| recv: Local<'_, Value>, | ||
| args: &[Local<'_, Value>], | ||
| ) -> Option<Local<'s, Value>> { | ||
| let args = Local::slice_into_raw(args); | ||
| let argc = int::try_from(args.len()).unwrap(); | ||
| let argv = args.as_ptr(); | ||
| unsafe { | ||
| scope.cast_local(|sd| { | ||
| v8__Object__CallAsFunction( | ||
| self, | ||
| sd.get_current_context(), | ||
| &*recv, | ||
| argc, | ||
| argv, | ||
| ) | ||
| }) | ||
| } | ||
| } | ||
| /// Calls the [`Object`] as a function in a given context. | ||
| /// | ||
| /// For more information, see [`Object::is_callable()`]. | ||
| #[inline] | ||
| pub fn call_as_function_with_context<'s>( | ||
| &self, | ||
| scope: &PinScope<'s, '_, ()>, | ||
| context: Local<'_, Context>, | ||
| recv: Local<'_, Value>, | ||
| args: &[Local<'_, Value>], | ||
| ) -> Option<Local<'s, Value>> { | ||
| let args = Local::slice_into_raw(args); | ||
| let argc = int::try_from(args.len()).unwrap(); | ||
| let argv = args.as_ptr(); | ||
| unsafe { | ||
| let ret = v8__Object__CallAsFunction( | ||
| self, | ||
| context.as_non_null().as_ptr(), | ||
| &*recv, | ||
| argc, | ||
| argv, | ||
| ); | ||
| if ret.is_null() { | ||
| None | ||
| } else { | ||
| scope.cast_local(|_| ret) | ||
| } | ||
| } | ||
| } | ||
| /// Calls the [`Object`] as a constructor with the provided arguments. | ||
| /// This is similar to | ||
| /// [`Function::new_instance()`](crate::Function::new_instance). | ||
| /// | ||
| /// For more information, see [`Object::is_constructor()`]. | ||
| #[inline] | ||
| pub fn call_as_constructor<'s>( | ||
| &self, | ||
| scope: &PinScope<'s, '_>, | ||
| args: &[Local<'_, Value>], | ||
| ) -> Option<Local<'s, Value>> { | ||
| let args = Local::slice_into_raw(args); | ||
| let argc = int::try_from(args.len()).unwrap(); | ||
| let argv = args.as_ptr(); | ||
| unsafe { | ||
| scope.cast_local(|sd| { | ||
| v8__Object__CallAsConstructor( | ||
| self, | ||
| sd.get_current_context(), | ||
| argc, | ||
| argv, | ||
| ) | ||
| }) | ||
| } | ||
| } | ||
| /// Calls the [`Object`] as a constructor in a given context. | ||
| /// | ||
| /// For more information, see [`Object::is_constructor()`]. | ||
| #[inline] | ||
| pub fn call_as_constructor_with_context<'s>( | ||
| &self, | ||
| scope: &PinScope<'s, '_, ()>, | ||
| context: Local<'_, Context>, | ||
| args: &[Local<'_, Value>], | ||
| ) -> Option<Local<'s, Value>> { | ||
| let args = Local::slice_into_raw(args); | ||
| let argc = int::try_from(args.len()).unwrap(); | ||
| let argv = args.as_ptr(); | ||
| unsafe { | ||
| let ret = v8__Object__CallAsConstructor( | ||
| self, | ||
| context.as_non_null().as_ptr(), | ||
| argc, | ||
| argv, | ||
| ); | ||
| if ret.is_null() { | ||
| None | ||
| } else { | ||
| scope.cast_local(|_| ret) | ||
| } | ||
| } | ||
| } | ||
| } | ||
@@ -1280,4 +1427,3 @@ | ||
| /// Returns an array of length size() * 2, where index N is the Nth key and | ||
| /// index N + 1 is the Nth value. | ||
| /// Returns an array of the keys in this Set. | ||
| #[inline(always)] | ||
@@ -1284,0 +1430,0 @@ pub fn as_array<'s>(&self, scope: &PinScope<'s, '_>) -> Local<'s, Array> { |
+0
-2
@@ -6,4 +6,2 @@ //! SIMD-accelerated Unicode validation, transcoding, and base64. | ||
| //! that occur when linking a separate simdutf crate. | ||
| //! | ||
| //! Enable with the `simdutf` cargo feature. | ||
@@ -10,0 +8,0 @@ // --------------------------------------------------------------------------- |
+13
-53
@@ -87,3 +87,2 @@ use crate::Isolate; | ||
| /// calls cost more than V8 handling the tiny string itself. | ||
| #[cfg(feature = "simdutf")] | ||
| const NONASCII_ENCODE_SIMD_THRESHOLD: usize = 16; | ||
@@ -494,3 +493,2 @@ | ||
| // range and let V8 reject the rest. | ||
| #[cfg(feature = "simdutf")] | ||
| if buffer.len() <= Self::MAX_LENGTH { | ||
@@ -527,3 +525,2 @@ // Pure ASCII (the common case): the bytes are already valid one-byte | ||
| /// V8's lossy `NewFromUtf8` when the input isn't valid UTF-8. | ||
| #[cfg(feature = "simdutf")] | ||
| fn new_from_utf8_transcode<'s>( | ||
@@ -1057,4 +1054,4 @@ scope: &PinScope<'s, '_, ()>, | ||
| /// Uses [`ValueView`] internally for single-pass access to the string | ||
| /// data. When the `simdutf` feature is enabled, uses SIMD-accelerated | ||
| /// transcoding for Latin-1 and two-byte strings. | ||
| /// data, with SIMD-accelerated transcoding for Latin-1 and two-byte | ||
| /// strings. | ||
| pub fn to_rust_string_lossy(&self, scope: &Isolate) -> std::string::String { | ||
@@ -1153,3 +1150,2 @@ // No preliminary `self.length()` FFI call: the `ValueView` reports the | ||
| // the string is long enough for the simdutf FFI call to pay off. | ||
| #[cfg(feature = "simdutf")] | ||
| if bytes.len() >= ONEBYTE_SIMD_THRESHOLD | ||
@@ -1344,5 +1340,4 @@ && bytes.len().saturating_mul(2) <= N | ||
| /// - **Two-byte** (UTF-16/WTF-16): transcodes to UTF-8, returns | ||
| /// `Cow::Owned`. When the `simdutf` feature is enabled, uses | ||
| /// SIMD-accelerated conversion for valid UTF-16 strings above a | ||
| /// threshold size. | ||
| /// `Cow::Owned`, using SIMD-accelerated conversion for valid UTF-16 | ||
| /// strings above a threshold size. | ||
| #[inline(always)] | ||
@@ -1366,4 +1361,3 @@ pub fn to_cow_lossy(&self) -> Cow<'_, str> { | ||
| // String conversion helpers. | ||
| // When the `simdutf` feature is enabled, hot paths dispatch to | ||
| // SIMD-accelerated routines in `crate::simdutf`. | ||
| // Hot paths dispatch to SIMD-accelerated routines in `crate::simdutf`. | ||
| // --------------------------------------------------------------------------- | ||
@@ -1375,3 +1369,2 @@ | ||
| /// around 16 units. | ||
| #[cfg(feature = "simdutf")] | ||
| const WTF16_SIMD_THRESHOLD: usize = 16; | ||
@@ -1382,3 +1375,2 @@ | ||
| /// overhead that only pays off once the scan is long enough). | ||
| #[cfg(feature = "simdutf")] | ||
| const ONEBYTE_SIMD_THRESHOLD: usize = 128; | ||
@@ -1397,3 +1389,2 @@ | ||
| /// at least the UTF-8 length of `bytes` (which never exceeds `bytes.len() * 2`). | ||
| #[cfg(feature = "simdutf")] | ||
| #[inline(always)] | ||
@@ -1418,3 +1409,2 @@ unsafe fn transcode_latin1_to_utf8( | ||
| fn onebyte_is_ascii(bytes: &[u8]) -> bool { | ||
| #[cfg(feature = "simdutf")] | ||
| if bytes.len() >= ONEBYTE_SIMD_THRESHOLD { | ||
@@ -1448,3 +1438,2 @@ // simdutf's `validate_ascii` scans the *whole* buffer even when the very | ||
| fn onebyte_to_string(bytes: &[u8]) -> std::string::String { | ||
| #[cfg(feature = "simdutf")] | ||
| { | ||
@@ -1512,25 +1501,11 @@ // For long strings, one `utf8_length_from_latin1` SIMD pass both detects | ||
| debug_assert!(!bytes.is_ascii()); | ||
| #[cfg(feature = "simdutf")] | ||
| { | ||
| let utf8_len = crate::simdutf::utf8_length_from_latin1(bytes); | ||
| let mut buf: Vec<u8> = Vec::with_capacity(utf8_len); | ||
| // SAFETY: `buf` has capacity `utf8_len`, exactly what the transcode writes. | ||
| unsafe { | ||
| let written = transcode_latin1_to_utf8(bytes, buf.as_mut_ptr(), utf8_len); | ||
| debug_assert_eq!(written, utf8_len); | ||
| buf.set_len(written); | ||
| std::string::String::from_utf8_unchecked(buf) | ||
| } | ||
| let utf8_len = crate::simdutf::utf8_length_from_latin1(bytes); | ||
| let mut buf: Vec<u8> = Vec::with_capacity(utf8_len); | ||
| // SAFETY: `buf` has capacity `utf8_len`, exactly what the transcode writes. | ||
| unsafe { | ||
| let written = transcode_latin1_to_utf8(bytes, buf.as_mut_ptr(), utf8_len); | ||
| debug_assert_eq!(written, utf8_len); | ||
| buf.set_len(written); | ||
| std::string::String::from_utf8_unchecked(buf) | ||
| } | ||
| #[cfg(not(feature = "simdutf"))] | ||
| { | ||
| let max_utf8_len = bytes.len() * 2; | ||
| let mut buf: Vec<u8> = Vec::with_capacity(max_utf8_len); | ||
| unsafe { | ||
| let written = | ||
| latin1_to_utf8(bytes.len(), bytes.as_ptr(), buf.as_mut_ptr()); | ||
| buf.set_len(written); | ||
| std::string::String::from_utf8_unchecked(buf) | ||
| } | ||
| } | ||
| } | ||
@@ -1542,3 +1517,2 @@ | ||
| fn wtf16_to_string(units: &[u16]) -> std::string::String { | ||
| #[cfg(feature = "simdutf")] | ||
| { | ||
@@ -1578,3 +1552,2 @@ // Single simdutf pass that validates *and* converts. Each UTF-16 code unit | ||
| fn wtf16_into_string(units: &[u16], buf: &mut std::string::String) { | ||
| #[cfg(feature = "simdutf")] | ||
| { | ||
@@ -1615,21 +1588,9 @@ if units.len() >= WTF16_SIMD_THRESHOLD { | ||
| ) -> Cow<'a, str> { | ||
| #[cfg(feature = "simdutf")] | ||
| let utf8_len = crate::simdutf::utf8_length_from_latin1(bytes); | ||
| #[cfg(not(feature = "simdutf"))] | ||
| let utf8_len = bytes.len() * 2; // conservative upper bound | ||
| if utf8_len <= N { | ||
| // SAFETY: `buffer` is valid for `N >= utf8_len` writes (guarded above). | ||
| #[cfg(feature = "simdutf")] | ||
| let written = unsafe { | ||
| transcode_latin1_to_utf8(bytes, buffer.as_mut_ptr() as *mut u8, utf8_len) | ||
| }; | ||
| #[cfg(not(feature = "simdutf"))] | ||
| let written = unsafe { | ||
| latin1_to_utf8( | ||
| bytes.len(), | ||
| bytes.as_ptr(), | ||
| buffer.as_mut_ptr() as *mut u8, | ||
| ) | ||
| }; | ||
@@ -1653,3 +1614,2 @@ unsafe { | ||
| ) -> Cow<'a, str> { | ||
| #[cfg(feature = "simdutf")] | ||
| { | ||
@@ -1656,0 +1616,0 @@ if units.len() >= WTF16_SIMD_THRESHOLD { |
+26
-0
@@ -156,2 +156,8 @@ use crate::ConstructorBehavior; | ||
| fn v8__ObjectTemplate__SetImmutableProto(this: *const ObjectTemplate); | ||
| fn v8__ObjectTemplate__SetCallAsFunctionHandler( | ||
| this: *const ObjectTemplate, | ||
| callback: FunctionCallback, | ||
| data_or_null: *const Value, | ||
| ); | ||
| } | ||
@@ -1068,2 +1074,22 @@ | ||
| } | ||
| /// Sets the callback to be used when calling instances created from this | ||
| /// template as a function. | ||
| /// | ||
| /// If no callback is set, instances behave like normal [`Object`]s that | ||
| /// cannot be called like [`Function`]s. | ||
| #[inline(always)] | ||
| pub fn set_call_as_function_handler( | ||
| &self, | ||
| callback: impl MapFnTo<FunctionCallback>, | ||
| data: Option<Local<'_, Value>>, | ||
| ) { | ||
| unsafe { | ||
| v8__ObjectTemplate__SetCallAsFunctionHandler( | ||
| self, | ||
| callback.map_fn_to(), | ||
| data.map_or_else(null, |p| &*p), | ||
| ); | ||
| } | ||
| } | ||
| } |
@@ -1,5 +0,4 @@ | ||
| #![cfg(feature = "simdutf")] | ||
| // Tests for the simdutf feature-gated bindings. | ||
| // Tests for the simdutf bindings. | ||
| // | ||
| // These tests require `V8_FROM_SOURCE=1 cargo test --features simdutf`. | ||
| // These tests require `V8_FROM_SOURCE=1 cargo test`. | ||
@@ -6,0 +5,0 @@ use v8::simdutf; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}__ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}_ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}_ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}__ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}_ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}__ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}__ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}__ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}?kCallbackOptionsType@CTypeInfo@v8@@2W4Type@12@B"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}?ArgumentInfo@CFunctionInfo@v8@@QEBAAEBVCTypeInfo@2@I@Z"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0CFunctionInfo@v8@@QEAA@AEBVCTypeInfo@1@IPEBV21@W4Int64Representation@01@@Z"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0CFunction@v8@@QEAA@PEBXPEBVCFunctionInfo@1@@Z"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_int); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_int); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0HeapStatistics@v8@@QEAA@XZ"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0HeapSpaceStatistics@v8@@QEAA@XZ"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0HeapCodeStatistics@v8@@QEAA@XZ"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??1RustObj@@UEAA@XZ"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}?GetHumanReadableName@RustObj@@UEBAPEBDXZ"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| _unused: [u8; 0], | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalOneByteStringResource { | ||
| pub _base: ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalOneByteStringResource>() - 16usize]; | ||
| ["Alignment of ExternalOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}?UpdateDataCache@ExternalOneByteStringResource@String@v8@@QEAAXXZ"] | ||
| pub fn ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *const ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| pub struct ExternalStringResourceBase__bindgen_vtable(::std::os::raw::c_void); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalStringResourceBase { | ||
| pub vtable_: *const ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct ExternalStringResourceBase_SharedMemoryUsageRecorder { | ||
| pub vtable_: | ||
| *const ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::<ExternalStringResourceBase_SharedMemoryUsageRecorder>( | ||
| ) - 8usize]; | ||
| ["Alignment of ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::align_of::< | ||
| ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}?kDefaultMemoryEstimate@ExternalStringResourceBase@String@v8@@2_KB"] | ||
| pub static ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[repr(i32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const WriteFlags_kNone: WriteFlags__bindgen_ty_1 = 0; | ||
| pub const WriteFlags_kNullTerminate: WriteFlags__bindgen_ty_1 = 1; | ||
| pub const WriteFlags_kReplaceInvalidUtf8: WriteFlags__bindgen_ty_1 = 2; | ||
| pub type WriteFlags__bindgen_ty_1 = ::std::os::raw::c_int; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of WriteFlags"][::std::mem::size_of::<WriteFlags>() - 1usize]; | ||
| ["Alignment of WriteFlags"][::std::mem::align_of::<WriteFlags>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}_ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}_ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}_ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}__ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}__ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}?kCallbackOptionsType@CTypeInfo@v8@@2W4Type@12@B"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}?ArgumentInfo@CFunctionInfo@v8@@QEBAAEBVCTypeInfo@2@I@Z"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0CFunctionInfo@v8@@QEAA@AEBVCTypeInfo@1@IPEBV21@W4Int64Representation@01@@Z"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0CFunction@v8@@QEAA@PEBXPEBVCFunctionInfo@1@@Z"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_int); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_int); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0HeapStatistics@v8@@QEAA@XZ"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0HeapSpaceStatistics@v8@@QEAA@XZ"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??0HeapCodeStatistics@v8@@QEAA@XZ"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}??1RustObj@@UEAA@XZ"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}?GetHumanReadableName@RustObj@@UEBAPEBDXZ"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| _unused: [u8; 0], | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalOneByteStringResource { | ||
| pub _base: ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalOneByteStringResource>() - 16usize]; | ||
| ["Alignment of ExternalOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}?UpdateDataCache@ExternalOneByteStringResource@String@v8@@QEAAXXZ"] | ||
| pub fn ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *const ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| pub struct ExternalStringResourceBase__bindgen_vtable(::std::os::raw::c_void); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalStringResourceBase { | ||
| pub vtable_: *const ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct ExternalStringResourceBase_SharedMemoryUsageRecorder { | ||
| pub vtable_: | ||
| *const ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::<ExternalStringResourceBase_SharedMemoryUsageRecorder>( | ||
| ) - 8usize]; | ||
| ["Alignment of ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::align_of::< | ||
| ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}?kDefaultMemoryEstimate@ExternalStringResourceBase@String@v8@@2_KB"] | ||
| pub static ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[repr(i32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const WriteFlags_kNone: WriteFlags__bindgen_ty_1 = 0; | ||
| pub const WriteFlags_kNullTerminate: WriteFlags__bindgen_ty_1 = 1; | ||
| pub const WriteFlags_kReplaceInvalidUtf8: WriteFlags__bindgen_ty_1 = 2; | ||
| pub type WriteFlags__bindgen_ty_1 = ::std::os::raw::c_int; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of WriteFlags"][::std::mem::size_of::<WriteFlags>() - 1usize]; | ||
| ["Alignment of WriteFlags"][::std::mem::align_of::<WriteFlags>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}_ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
| /* automatically generated by rust-bindgen 0.72.0 */ | ||
| #[doc = " Base class for managed objects. Only descendent types of `GarbageCollected`\n can be constructed using `MakeGarbageCollected()`. Must be inherited from as\n left-most base class.\n\n Types inheriting from GarbageCollected must provide a method of\n signature `void Trace(cppgc::Visitor*) const` that dispatchs all managed\n pointers to the visitor and delegates to garbage-collected base classes.\n The method must be virtual if the type is not directly a child of\n GarbageCollected and marked as final.\n\n \\code\n // Example using final class.\n class FinalType final : public GarbageCollected<FinalType> {\n public:\n void Trace(cppgc::Visitor* visitor) const {\n // Dispatch using visitor->Trace(...);\n }\n };\n\n // Example using non-final base class.\n class NonFinalBase : public GarbageCollected<NonFinalBase> {\n public:\n virtual void Trace(cppgc::Visitor*) const {}\n };\n\n class FinalChild final : public NonFinalBase {\n public:\n void Trace(cppgc::Visitor* visitor) const final {\n // Dispatch using visitor->Trace(...);\n NonFinalBase::Trace(visitor);\n }\n };\n \\endcode"] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_GarbageCollected { | ||
| pub _address: u8, | ||
| } | ||
| pub type cppgc_GarbageCollected_IsGarbageCollectedTypeMarker = | ||
| ::std::os::raw::c_void; | ||
| pub type cppgc_GarbageCollected_ParentMostGarbageCollectedType<T> = T; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct cppgc_Visitor_Key { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_Visitor_Key"] | ||
| [::std::mem::size_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| ["Alignment of cppgc_Visitor_Key"] | ||
| [::std::mem::align_of::<cppgc_Visitor_Key>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct cppgc_NameProvider__bindgen_vtable(::std::os::raw::c_void); | ||
| #[doc = " NameProvider allows for providing a human-readable name for garbage-collected\n objects.\n\n There's two cases of names to distinguish:\n a. Explicitly specified names via using NameProvider. Such names are always\n preserved in the system.\n b. Internal names that Oilpan infers from a C++ type on the class hierarchy\n of the object. This is not necessarily the type of the actually\n instantiated object.\n\n Depending on the build configuration, Oilpan may hide names, i.e., represent\n them with kHiddenName, of case b. to avoid exposing internal details."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct cppgc_NameProvider { | ||
| pub vtable_: *const cppgc_NameProvider__bindgen_vtable, | ||
| } | ||
| #[doc = " Name that is used when hiding internals."] | ||
| pub const cppgc_NameProvider_kHiddenName: &::std::ffi::CStr = c"InternalNode"; | ||
| #[doc = " Name that is used in case compiler support is missing for composing a name\n from C++ types."] | ||
| pub const cppgc_NameProvider_kNoNameDeducible: &::std::ffi::CStr = c"<No name>"; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of cppgc_NameProvider"] | ||
| [::std::mem::size_of::<cppgc_NameProvider>() - 8usize]; | ||
| ["Alignment of cppgc_NameProvider"] | ||
| [::std::mem::align_of::<cppgc_NameProvider>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_WriteFlags { | ||
| pub _address: u8, | ||
| } | ||
| pub const v8_String_WriteFlags_kNone: v8_String_WriteFlags__bindgen_ty_1 = 0; | ||
| pub const v8_String_WriteFlags_kNullTerminate: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 1; | ||
| pub const v8_String_WriteFlags_kReplaceInvalidUtf8: | ||
| v8_String_WriteFlags__bindgen_ty_1 = 2; | ||
| pub type v8_String_WriteFlags__bindgen_ty_1 = ::std::os::raw::c_uint; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_WriteFlags"] | ||
| [::std::mem::size_of::<v8_String_WriteFlags>() - 1usize]; | ||
| ["Alignment of v8_String_WriteFlags"] | ||
| [::std::mem::align_of::<v8_String_WriteFlags>() - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalStringResourceBase { | ||
| pub vtable_: *const v8_String_ExternalStringResourceBase__bindgen_vtable, | ||
| } | ||
| #[repr(C)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable( | ||
| ::std::os::raw::c_void, | ||
| ); | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder { pub vtable_ : * const v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder__bindgen_vtable , } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder"] | ||
| [::std::mem::size_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| [ | ||
| "Alignment of v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder", | ||
| ][::std::mem::align_of::< | ||
| v8_String_ExternalStringResourceBase_SharedMemoryUsageRecorder, | ||
| >() | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v86String26ExternalStringResourceBase22kDefaultMemoryEstimateE"] | ||
| pub static v8_String_ExternalStringResourceBase_kDefaultMemoryEstimate: usize; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::size_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| ["Alignment of v8_String_ExternalStringResourceBase"] | ||
| [::std::mem::align_of::<v8_String_ExternalStringResourceBase>() - 8usize]; | ||
| }; | ||
| #[doc = " An ExternalOneByteStringResource is a wrapper around an one-byte\n string buffer that resides outside V8's heap. Implement an\n ExternalOneByteStringResource to manage the life cycle of the\n underlying buffer. Note that the string data must be immutable\n and that the data must be Latin-1 and not UTF-8, which would require\n special treatment internally in the engine and do not allow efficient\n indexing. Use String::New or convert to 16 bit data for non-Latin1."] | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_String_ExternalOneByteStringResource { | ||
| pub _base: v8_String_ExternalStringResourceBase, | ||
| pub cached_data_: *const ::std::os::raw::c_char, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_String_ExternalOneByteStringResource"][::std::mem::size_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() | ||
| - 16usize]; | ||
| ["Alignment of v8_String_ExternalOneByteStringResource"][::std::mem::align_of::< | ||
| v8_String_ExternalOneByteStringResource, | ||
| >() - 8usize]; | ||
| ["Offset of field: v8_String_ExternalOneByteStringResource::cached_data_"][::std::mem::offset_of!( | ||
| v8_String_ExternalOneByteStringResource, | ||
| cached_data_ | ||
| ) | ||
| - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[doc = " Update {cached_data_} with the data from the underlying buffer. This can\n be called only for cacheable resources."] | ||
| #[link_name = "\u{1}_ZN2v86String29ExternalOneByteStringResource15UpdateDataCacheEv"] | ||
| pub fn v8_String_ExternalOneByteStringResource_UpdateDataCache( | ||
| this: *mut v8_String_ExternalOneByteStringResource, | ||
| ); | ||
| } | ||
| impl v8_String_ExternalOneByteStringResource { | ||
| #[inline] | ||
| pub unsafe fn UpdateDataCache(&mut self) { | ||
| v8_String_ExternalOneByteStringResource_UpdateDataCache(self) | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct v8_Object_Wrappable { | ||
| pub _base_1: cppgc_NameProvider, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_Object_Wrappable"] | ||
| [::std::mem::size_of::<v8_Object_Wrappable>() - 8usize]; | ||
| ["Alignment of v8_Object_Wrappable"] | ||
| [::std::mem::align_of::<v8_Object_Wrappable>() - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CTypeInfo { | ||
| pub type_: v8_CTypeInfo_Type, | ||
| pub flags_: v8_CTypeInfo_Flags, | ||
| } | ||
| pub const v8_CTypeInfo_Type_kVoid: v8_CTypeInfo_Type = 0; | ||
| pub const v8_CTypeInfo_Type_kBool: v8_CTypeInfo_Type = 1; | ||
| pub const v8_CTypeInfo_Type_kUint8: v8_CTypeInfo_Type = 2; | ||
| pub const v8_CTypeInfo_Type_kInt32: v8_CTypeInfo_Type = 3; | ||
| pub const v8_CTypeInfo_Type_kUint32: v8_CTypeInfo_Type = 4; | ||
| pub const v8_CTypeInfo_Type_kInt64: v8_CTypeInfo_Type = 5; | ||
| pub const v8_CTypeInfo_Type_kUint64: v8_CTypeInfo_Type = 6; | ||
| pub const v8_CTypeInfo_Type_kFloat32: v8_CTypeInfo_Type = 7; | ||
| pub const v8_CTypeInfo_Type_kFloat64: v8_CTypeInfo_Type = 8; | ||
| pub const v8_CTypeInfo_Type_kPointer: v8_CTypeInfo_Type = 9; | ||
| pub const v8_CTypeInfo_Type_kV8Value: v8_CTypeInfo_Type = 10; | ||
| pub const v8_CTypeInfo_Type_kSeqOneByteString: v8_CTypeInfo_Type = 11; | ||
| pub const v8_CTypeInfo_Type_kApiObject: v8_CTypeInfo_Type = 12; | ||
| pub const v8_CTypeInfo_Type_kAny: v8_CTypeInfo_Type = 13; | ||
| pub type v8_CTypeInfo_Type = u8; | ||
| pub const v8_CTypeInfo_Flags_kNone: v8_CTypeInfo_Flags = 0; | ||
| pub const v8_CTypeInfo_Flags_kAllowSharedBit: v8_CTypeInfo_Flags = 1; | ||
| pub const v8_CTypeInfo_Flags_kEnforceRangeBit: v8_CTypeInfo_Flags = 2; | ||
| pub const v8_CTypeInfo_Flags_kClampBit: v8_CTypeInfo_Flags = 4; | ||
| pub const v8_CTypeInfo_Flags_kIsRestrictedBit: v8_CTypeInfo_Flags = 8; | ||
| pub type v8_CTypeInfo_Flags = u8; | ||
| pub type v8_CTypeInfo_Identifier = u32; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CTypeInfo20kCallbackOptionsTypeE"] | ||
| pub static v8_CTypeInfo_kCallbackOptionsType: v8_CTypeInfo_Type; | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CTypeInfo"][::std::mem::size_of::<v8_CTypeInfo>() - 2usize]; | ||
| ["Alignment of v8_CTypeInfo"] | ||
| [::std::mem::align_of::<v8_CTypeInfo>() - 1usize]; | ||
| ["Offset of field: v8_CTypeInfo::type_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, type_) - 0usize]; | ||
| ["Offset of field: v8_CTypeInfo::flags_"] | ||
| [::std::mem::offset_of!(v8_CTypeInfo, flags_) - 1usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_FastOneByteString { | ||
| pub data: *const ::std::os::raw::c_char, | ||
| pub length: u32, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_FastOneByteString"] | ||
| [::std::mem::size_of::<v8_FastOneByteString>() - 16usize]; | ||
| ["Alignment of v8_FastOneByteString"] | ||
| [::std::mem::align_of::<v8_FastOneByteString>() - 8usize]; | ||
| ["Offset of field: v8_FastOneByteString::data"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, data) - 0usize]; | ||
| ["Offset of field: v8_FastOneByteString::length"] | ||
| [::std::mem::offset_of!(v8_FastOneByteString, length) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunctionInfo { | ||
| pub return_info_: v8_CTypeInfo, | ||
| pub repr_: v8_CFunctionInfo_Int64Representation, | ||
| pub arg_count_: ::std::os::raw::c_uint, | ||
| pub arg_info_: *const v8_CTypeInfo, | ||
| } | ||
| pub const v8_CFunctionInfo_Int64Representation_kNumber: | ||
| v8_CFunctionInfo_Int64Representation = 0; | ||
| pub const v8_CFunctionInfo_Int64Representation_kBigInt: | ||
| v8_CFunctionInfo_Int64Representation = 1; | ||
| pub type v8_CFunctionInfo_Int64Representation = u8; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunctionInfo"] | ||
| [::std::mem::size_of::<v8_CFunctionInfo>() - 16usize]; | ||
| ["Alignment of v8_CFunctionInfo"] | ||
| [::std::mem::align_of::<v8_CFunctionInfo>() - 8usize]; | ||
| ["Offset of field: v8_CFunctionInfo::return_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, return_info_) - 0usize]; | ||
| ["Offset of field: v8_CFunctionInfo::repr_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, repr_) - 2usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_count_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_count_) - 4usize]; | ||
| ["Offset of field: v8_CFunctionInfo::arg_info_"] | ||
| [::std::mem::offset_of!(v8_CFunctionInfo, arg_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK2v813CFunctionInfo12ArgumentInfoEj"] | ||
| pub fn v8_CFunctionInfo_ArgumentInfo( | ||
| this: *const v8_CFunctionInfo, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo; | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v813CFunctionInfoC1ERKNS_9CTypeInfoEjPS2_NS0_19Int64RepresentationE"] | ||
| pub fn v8_CFunctionInfo_CFunctionInfo( | ||
| this: *mut v8_CFunctionInfo, | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ); | ||
| } | ||
| impl v8_CFunctionInfo { | ||
| #[inline] | ||
| pub unsafe fn ArgumentInfo( | ||
| &self, | ||
| index: ::std::os::raw::c_uint, | ||
| ) -> *const v8_CTypeInfo { | ||
| v8_CFunctionInfo_ArgumentInfo(self, index) | ||
| } | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| return_info: *const v8_CTypeInfo, | ||
| arg_count: ::std::os::raw::c_uint, | ||
| arg_info: *const v8_CTypeInfo, | ||
| repr: v8_CFunctionInfo_Int64Representation, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunctionInfo_CFunctionInfo( | ||
| __bindgen_tmp.as_mut_ptr(), | ||
| return_info, | ||
| arg_count, | ||
| arg_info, | ||
| repr, | ||
| ); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction { | ||
| pub address_: *const ::std::os::raw::c_void, | ||
| pub type_info_: *const v8_CFunctionInfo, | ||
| } | ||
| pub const v8_CFunction_OverloadResolution_kImpossible: | ||
| v8_CFunction_OverloadResolution = 0; | ||
| pub const v8_CFunction_OverloadResolution_kAtRuntime: | ||
| v8_CFunction_OverloadResolution = 1; | ||
| pub const v8_CFunction_OverloadResolution_kAtCompileTime: | ||
| v8_CFunction_OverloadResolution = 2; | ||
| pub type v8_CFunction_OverloadResolution = ::std::os::raw::c_int; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_CFunction_ArgUnwrap { | ||
| pub _address: u8, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_CFunction"][::std::mem::size_of::<v8_CFunction>() - 16usize]; | ||
| ["Alignment of v8_CFunction"] | ||
| [::std::mem::align_of::<v8_CFunction>() - 8usize]; | ||
| ["Offset of field: v8_CFunction::address_"] | ||
| [::std::mem::offset_of!(v8_CFunction, address_) - 0usize]; | ||
| ["Offset of field: v8_CFunction::type_info_"] | ||
| [::std::mem::offset_of!(v8_CFunction, type_info_) - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v89CFunctionC1EPKvPKNS_13CFunctionInfoE"] | ||
| pub fn v8_CFunction_CFunction( | ||
| this: *mut v8_CFunction, | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ); | ||
| } | ||
| impl v8_CFunction { | ||
| #[inline] | ||
| pub unsafe fn new( | ||
| address: *const ::std::os::raw::c_void, | ||
| type_info: *const v8_CFunctionInfo, | ||
| ) -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_CFunction_CFunction(__bindgen_tmp.as_mut_ptr(), address, type_info); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| impl v8_GCType { | ||
| pub const kGCTypeScavenge: v8_GCType = v8_GCType(1); | ||
| pub const kGCTypeMinorMarkSweep: v8_GCType = v8_GCType(2); | ||
| pub const kGCTypeMarkSweepCompact: v8_GCType = v8_GCType(4); | ||
| pub const kGCTypeIncrementalMarking: v8_GCType = v8_GCType(8); | ||
| pub const kGCTypeProcessWeakCallbacks: v8_GCType = v8_GCType(16); | ||
| pub const kGCTypeAll: v8_GCType = v8_GCType(31); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCType(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCType> for v8_GCType { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCType(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCType { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCType) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCType(pub ::std::os::raw::c_uint); | ||
| impl v8_GCCallbackFlags { | ||
| pub const kNoGCCallbackFlags: v8_GCCallbackFlags = v8_GCCallbackFlags(0); | ||
| pub const kGCCallbackFlagConstructRetainedObjectInfos: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(2); | ||
| pub const kGCCallbackFlagForced: v8_GCCallbackFlags = v8_GCCallbackFlags(4); | ||
| pub const kGCCallbackFlagSynchronousPhantomCallbackProcessing: | ||
| v8_GCCallbackFlags = v8_GCCallbackFlags(8); | ||
| pub const kGCCallbackFlagCollectAllAvailableGarbage: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(16); | ||
| pub const kGCCallbackFlagCollectAllExternalMemory: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(32); | ||
| pub const kGCCallbackScheduleIdleGarbageCollection: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(64); | ||
| pub const kGCCallbackFlagLastResort: v8_GCCallbackFlags = | ||
| v8_GCCallbackFlags(128); | ||
| } | ||
| impl ::std::ops::BitOr<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitor(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 | other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitOrAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitor_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 |= rhs.0; | ||
| } | ||
| } | ||
| impl ::std::ops::BitAnd<v8_GCCallbackFlags> for v8_GCCallbackFlags { | ||
| type Output = Self; | ||
| #[inline] | ||
| fn bitand(self, other: Self) -> Self { | ||
| v8_GCCallbackFlags(self.0 & other.0) | ||
| } | ||
| } | ||
| impl ::std::ops::BitAndAssign for v8_GCCallbackFlags { | ||
| #[inline] | ||
| fn bitand_assign(&mut self, rhs: v8_GCCallbackFlags) { | ||
| self.0 &= rhs.0; | ||
| } | ||
| } | ||
| #[repr(transparent)] | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub struct v8_GCCallbackFlags(pub ::std::os::raw::c_uint); | ||
| #[repr(i32)] | ||
| #[doc = " Import phases in import requests."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_ModuleImportPhase { | ||
| kSource = 0, | ||
| kDefer = 1, | ||
| kEvaluation = 2, | ||
| } | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapStatistics { | ||
| pub total_heap_size_: usize, | ||
| pub total_heap_size_executable_: usize, | ||
| pub total_physical_size_: usize, | ||
| pub total_available_size_: usize, | ||
| pub used_heap_size_: usize, | ||
| pub heap_size_limit_: usize, | ||
| pub malloced_memory_: usize, | ||
| pub external_memory_: usize, | ||
| pub peak_malloced_memory_: usize, | ||
| pub does_zap_garbage_: bool, | ||
| pub number_of_native_contexts_: usize, | ||
| pub number_of_detached_contexts_: usize, | ||
| pub total_global_handles_size_: usize, | ||
| pub used_global_handles_size_: usize, | ||
| pub total_allocated_bytes_: u64, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapStatistics"] | ||
| [::std::mem::size_of::<v8_HeapStatistics>() - 120usize]; | ||
| ["Alignment of v8_HeapStatistics"] | ||
| [::std::mem::align_of::<v8_HeapStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_heap_size_) - 0usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_heap_size_executable_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_heap_size_executable_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_physical_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, total_physical_size_) - 16usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_available_size_ | ||
| ) - 24usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_heap_size_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, used_heap_size_) - 32usize]; | ||
| ["Offset of field: v8_HeapStatistics::heap_size_limit_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, heap_size_limit_) - 40usize]; | ||
| ["Offset of field: v8_HeapStatistics::malloced_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, malloced_memory_) - 48usize]; | ||
| ["Offset of field: v8_HeapStatistics::external_memory_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, external_memory_) - 56usize]; | ||
| ["Offset of field: v8_HeapStatistics::peak_malloced_memory_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| peak_malloced_memory_ | ||
| ) - 64usize]; | ||
| ["Offset of field: v8_HeapStatistics::does_zap_garbage_"] | ||
| [::std::mem::offset_of!(v8_HeapStatistics, does_zap_garbage_) - 72usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_native_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_native_contexts_ | ||
| ) | ||
| - 80usize]; | ||
| ["Offset of field: v8_HeapStatistics::number_of_detached_contexts_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| number_of_detached_contexts_ | ||
| ) | ||
| - 88usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_global_handles_size_ | ||
| ) | ||
| - 96usize]; | ||
| ["Offset of field: v8_HeapStatistics::used_global_handles_size_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| used_global_handles_size_ | ||
| ) | ||
| - 104usize]; | ||
| ["Offset of field: v8_HeapStatistics::total_allocated_bytes_"][::std::mem::offset_of!( | ||
| v8_HeapStatistics, | ||
| total_allocated_bytes_ | ||
| ) - 112usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v814HeapStatisticsC1Ev"] | ||
| pub fn v8_HeapStatistics_HeapStatistics(this: *mut v8_HeapStatistics); | ||
| } | ||
| impl v8_HeapStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapStatistics_HeapStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapSpaceStatistics { | ||
| pub space_name_: *const ::std::os::raw::c_char, | ||
| pub space_size_: usize, | ||
| pub space_used_size_: usize, | ||
| pub space_available_size_: usize, | ||
| pub physical_space_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapSpaceStatistics"] | ||
| [::std::mem::size_of::<v8_HeapSpaceStatistics>() - 40usize]; | ||
| ["Alignment of v8_HeapSpaceStatistics"] | ||
| [::std::mem::align_of::<v8_HeapSpaceStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_name_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_name_) - 0usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_size_"] | ||
| [::std::mem::offset_of!(v8_HeapSpaceStatistics, space_size_) - 8usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_used_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_used_size_ | ||
| ) - 16usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::space_available_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| space_available_size_ | ||
| ) | ||
| - 24usize]; | ||
| ["Offset of field: v8_HeapSpaceStatistics::physical_space_size_"][::std::mem::offset_of!( | ||
| v8_HeapSpaceStatistics, | ||
| physical_space_size_ | ||
| ) | ||
| - 32usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v819HeapSpaceStatisticsC1Ev"] | ||
| pub fn v8_HeapSpaceStatistics_HeapSpaceStatistics( | ||
| this: *mut v8_HeapSpaceStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapSpaceStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapSpaceStatistics_HeapSpaceStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct v8_HeapCodeStatistics { | ||
| pub code_and_metadata_size_: usize, | ||
| pub bytecode_and_metadata_size_: usize, | ||
| pub external_script_source_size_: usize, | ||
| pub cpu_profiler_metadata_size_: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of v8_HeapCodeStatistics"] | ||
| [::std::mem::size_of::<v8_HeapCodeStatistics>() - 32usize]; | ||
| ["Alignment of v8_HeapCodeStatistics"] | ||
| [::std::mem::align_of::<v8_HeapCodeStatistics>() - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::code_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| code_and_metadata_size_ | ||
| ) | ||
| - 0usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::bytecode_and_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| bytecode_and_metadata_size_ | ||
| ) | ||
| - 8usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::external_script_source_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| external_script_source_size_ | ||
| ) | ||
| - 16usize]; | ||
| ["Offset of field: v8_HeapCodeStatistics::cpu_profiler_metadata_size_"][::std::mem::offset_of!( | ||
| v8_HeapCodeStatistics, | ||
| cpu_profiler_metadata_size_ | ||
| ) | ||
| - 24usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN2v818HeapCodeStatisticsC1Ev"] | ||
| pub fn v8_HeapCodeStatistics_HeapCodeStatistics( | ||
| this: *mut v8_HeapCodeStatistics, | ||
| ); | ||
| } | ||
| impl v8_HeapCodeStatistics { | ||
| #[inline] | ||
| pub unsafe fn new() -> Self { | ||
| let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit(); | ||
| v8_HeapCodeStatistics_HeapCodeStatistics(__bindgen_tmp.as_mut_ptr()); | ||
| __bindgen_tmp.assume_init() | ||
| } | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Isolate_UseCounterFeature { | ||
| kUseAsm = 0, | ||
| kBreakIterator = 1, | ||
| kOBSOLETE_LegacyConst = 2, | ||
| kOBSOLETE_MarkDequeOverflow = 3, | ||
| kOBSOLETE_StoreBufferOverflow = 4, | ||
| kOBSOLETE_SlotsBufferOverflow = 5, | ||
| kOBSOLETE_ObjectObserve = 6, | ||
| kForcedGC = 7, | ||
| kSloppyMode = 8, | ||
| kStrictMode = 9, | ||
| kOBSOLETE_StrongMode = 10, | ||
| kRegExpPrototypeStickyGetter = 11, | ||
| kRegExpPrototypeToString = 12, | ||
| kRegExpPrototypeUnicodeGetter = 13, | ||
| kOBSOLETE_IntlV8Parse = 14, | ||
| kOBSOLETE_IntlPattern = 15, | ||
| kOBSOLETE_IntlResolved = 16, | ||
| kOBSOLETE_PromiseChain = 17, | ||
| kOBSOLETE_PromiseAccept = 18, | ||
| kOBSOLETE_PromiseDefer = 19, | ||
| kHtmlCommentInExternalScript = 20, | ||
| kHtmlComment = 21, | ||
| kSloppyModeBlockScopedFunctionRedefinition = 22, | ||
| kForInInitializer = 23, | ||
| kOBSOLETE_ArrayProtectorDirtied = 24, | ||
| kArraySpeciesModified = 25, | ||
| kArrayPrototypeConstructorModified = 26, | ||
| kOBSOLETE_ArrayInstanceProtoModified = 27, | ||
| kArrayInstanceConstructorModified = 28, | ||
| kOBSOLETE_LegacyFunctionDeclaration = 29, | ||
| kOBSOLETE_RegExpPrototypeSourceGetter = 30, | ||
| kOBSOLETE_RegExpPrototypeOldFlagGetter = 31, | ||
| kDecimalWithLeadingZeroInStrictMode = 32, | ||
| kLegacyDateParser = 33, | ||
| kDefineGetterOrSetterWouldThrow = 34, | ||
| kFunctionConstructorReturnedUndefined = 35, | ||
| kAssigmentExpressionLHSIsCallInSloppy = 36, | ||
| kAssigmentExpressionLHSIsCallInStrict = 37, | ||
| kPromiseConstructorReturnedUndefined = 38, | ||
| kOBSOLETE_ConstructorNonUndefinedPrimitiveReturn = 39, | ||
| kOBSOLETE_LabeledExpressionStatement = 40, | ||
| kOBSOLETE_LineOrParagraphSeparatorAsLineTerminator = 41, | ||
| kIndexAccessor = 42, | ||
| kErrorCaptureStackTrace = 43, | ||
| kErrorPrepareStackTrace = 44, | ||
| kErrorStackTraceLimit = 45, | ||
| kWebAssemblyInstantiation = 46, | ||
| kDeoptimizerDisableSpeculation = 47, | ||
| kOBSOLETE_ArrayPrototypeSortJSArrayModifiedPrototype = 48, | ||
| kFunctionTokenOffsetTooLongForToString = 49, | ||
| kWasmSharedMemory = 50, | ||
| kWasmThreadOpcodes = 51, | ||
| kOBSOLETE_AtomicsNotify = 52, | ||
| kOBSOLETE_AtomicsWake = 53, | ||
| kCollator = 54, | ||
| kNumberFormat = 55, | ||
| kDateTimeFormat = 56, | ||
| kPluralRules = 57, | ||
| kRelativeTimeFormat = 58, | ||
| kLocale = 59, | ||
| kListFormat = 60, | ||
| kSegmenter = 61, | ||
| kStringLocaleCompare = 62, | ||
| kOBSOLETE_StringToLocaleUpperCase = 63, | ||
| kStringToLocaleLowerCase = 64, | ||
| kNumberToLocaleString = 65, | ||
| kDateToLocaleString = 66, | ||
| kDateToLocaleDateString = 67, | ||
| kDateToLocaleTimeString = 68, | ||
| kAttemptOverrideReadOnlyOnPrototypeSloppy = 69, | ||
| kAttemptOverrideReadOnlyOnPrototypeStrict = 70, | ||
| kOBSOLETE_OptimizedFunctionWithOneShotBytecode = 71, | ||
| kRegExpMatchIsTrueishOnNonJSRegExp = 72, | ||
| kRegExpMatchIsFalseishOnJSRegExp = 73, | ||
| kOBSOLETE_DateGetTimezoneOffset = 74, | ||
| kStringNormalize = 75, | ||
| kCallSiteAPIGetFunctionSloppyCall = 76, | ||
| kCallSiteAPIGetThisSloppyCall = 77, | ||
| kOBSOLETE_RegExpMatchAllWithNonGlobalRegExp = 78, | ||
| kRegExpExecCalledOnSlowRegExp = 79, | ||
| kRegExpReplaceCalledOnSlowRegExp = 80, | ||
| kDisplayNames = 81, | ||
| kSharedArrayBufferConstructed = 82, | ||
| kArrayPrototypeHasElements = 83, | ||
| kObjectPrototypeHasElements = 84, | ||
| kNumberFormatStyleUnit = 85, | ||
| kDateTimeFormatRange = 86, | ||
| kDateTimeFormatDateTimeStyle = 87, | ||
| kBreakIteratorTypeWord = 88, | ||
| kBreakIteratorTypeLine = 89, | ||
| kInvalidatedArrayBufferDetachingProtector = 90, | ||
| kInvalidatedArrayConstructorProtector = 91, | ||
| kInvalidatedArrayIteratorLookupChainProtector = 92, | ||
| kInvalidatedArraySpeciesLookupChainProtector = 93, | ||
| kInvalidatedIsConcatSpreadableLookupChainProtector = 94, | ||
| kInvalidatedMapIteratorLookupChainProtector = 95, | ||
| kInvalidatedNoElementsProtector = 96, | ||
| kInvalidatedPromiseHookProtector = 97, | ||
| kInvalidatedPromiseResolveLookupChainProtector = 98, | ||
| kInvalidatedPromiseSpeciesLookupChainProtector = 99, | ||
| kInvalidatedPromiseThenLookupChainProtector = 100, | ||
| kInvalidatedRegExpSpeciesLookupChainProtector = 101, | ||
| kInvalidatedSetIteratorLookupChainProtector = 102, | ||
| kInvalidatedStringIteratorLookupChainProtector = 103, | ||
| kInvalidatedStringLengthOverflowLookupChainProtector = 104, | ||
| kInvalidatedTypedArraySpeciesLookupChainProtector = 105, | ||
| kWasmSimdOpcodes = 106, | ||
| kVarRedeclaredCatchBinding = 107, | ||
| kWasmRefTypes = 108, | ||
| kWasmBulkMemory = 109, | ||
| kWasmMultiValue = 110, | ||
| kWasmExceptionHandling = 111, | ||
| kInvalidatedMegaDOMProtector = 112, | ||
| kFunctionPrototypeArguments = 113, | ||
| kFunctionPrototypeCaller = 114, | ||
| kTurboFanOsrCompileStarted = 115, | ||
| kAsyncStackTaggingCreateTaskCall = 116, | ||
| kDurationFormat = 117, | ||
| kInvalidatedNumberStringNotRegexpLikeProtector = 118, | ||
| kOBSOLETE_RegExpUnicodeSetIncompatibilitiesWithUnicodeMode = 119, | ||
| kOBSOLETE_ImportAssertionDeprecatedSyntax = 120, | ||
| kLocaleInfoObsoletedGetters = 121, | ||
| kLocaleInfoFunctions = 122, | ||
| kCompileHintsMagicAll = 123, | ||
| kInvalidatedNoProfilingProtector = 124, | ||
| kWasmMemory64 = 125, | ||
| kWasmMultiMemory = 126, | ||
| kWasmGC = 127, | ||
| kWasmImportedStrings = 128, | ||
| kSourceMappingUrlMagicCommentAtSign = 129, | ||
| kTemporalObject = 130, | ||
| kWasmModuleCompilation = 131, | ||
| kInvalidatedNoUndetectableObjectsProtector = 132, | ||
| kWasmJavaScriptPromiseIntegration = 133, | ||
| kWasmReturnCall = 134, | ||
| kWasmExtendedConst = 135, | ||
| kWasmRelaxedSimd = 136, | ||
| kWasmTypeReflection = 137, | ||
| kWasmExnRef = 138, | ||
| kWasmTypedFuncRef = 139, | ||
| kInvalidatedStringWrapperToPrimitiveProtector = 140, | ||
| kDocumentAllLegacyCall = 141, | ||
| kDocumentAllLegacyConstruct = 142, | ||
| kConsoleContext = 143, | ||
| kWasmImportedStringsUtf8 = 144, | ||
| kResizableArrayBuffer = 145, | ||
| kGrowableSharedArrayBuffer = 146, | ||
| kArrayByCopy = 147, | ||
| kArrayFromAsync = 148, | ||
| kIteratorMethods = 149, | ||
| kPromiseAny = 150, | ||
| kSetMethods = 151, | ||
| kArrayFindLast = 152, | ||
| kArrayGroup = 153, | ||
| kArrayBufferTransfer = 154, | ||
| kPromiseWithResolvers = 155, | ||
| kAtomicsWaitAsync = 156, | ||
| kExtendingNonExtensibleWithPrivate = 157, | ||
| kPromiseTry = 158, | ||
| kStringReplaceAll = 159, | ||
| kStringWellFormed = 160, | ||
| kWeakReferences = 161, | ||
| kErrorIsError = 162, | ||
| kInvalidatedTypedArrayLengthLookupChainProtector = 163, | ||
| kRegExpEscape = 164, | ||
| kFloat16Array = 165, | ||
| kExplicitResourceManagement = 166, | ||
| kWasmBranchHinting = 167, | ||
| kWasmMutableGlobals = 168, | ||
| kUint8ArrayToFromBase64AndHex = 169, | ||
| kAtomicsPause = 170, | ||
| kTopLevelAwait = 171, | ||
| kLogicalAssignment = 172, | ||
| kNullishCoalescing = 173, | ||
| kInvalidatedNoDateTimeConfigurationChangeProtector = 174, | ||
| kWasmNonTrappingFloatToInt = 175, | ||
| kWasmSignExtensionOps = 176, | ||
| kRegExpCompile = 177, | ||
| kRegExpStaticProperties = 178, | ||
| kRegExpStaticPropertiesWithLastMatch = 179, | ||
| kWithStatement = 180, | ||
| kHtmlWrapperMethods = 181, | ||
| kWasmCustomDescriptors = 182, | ||
| kOBSOLETE_WasmResizableBuffers = 183, | ||
| kInvalidatedArrayBufferMutableProtector = 184, | ||
| kHoleyArrayReadthrough = 185, | ||
| kUseCounterFeatureCount = 186, | ||
| } | ||
| #[repr(u32)] | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] | ||
| pub enum v8_Intercepted { | ||
| kNo = 1, | ||
| kYes = 0, | ||
| } | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct memory_span_t { | ||
| pub data: *mut u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of memory_span_t"][::std::mem::size_of::<memory_span_t>() - 16usize]; | ||
| ["Alignment of memory_span_t"] | ||
| [::std::mem::align_of::<memory_span_t>() - 8usize]; | ||
| ["Offset of field: memory_span_t::data"] | ||
| [::std::mem::offset_of!(memory_span_t, data) - 0usize]; | ||
| ["Offset of field: memory_span_t::size"] | ||
| [::std::mem::offset_of!(memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct const_memory_span_t { | ||
| pub data: *const u8, | ||
| pub size: usize, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of const_memory_span_t"] | ||
| [::std::mem::size_of::<const_memory_span_t>() - 16usize]; | ||
| ["Alignment of const_memory_span_t"] | ||
| [::std::mem::align_of::<const_memory_span_t>() - 8usize]; | ||
| ["Offset of field: const_memory_span_t::data"] | ||
| [::std::mem::offset_of!(const_memory_span_t, data) - 0usize]; | ||
| ["Offset of field: const_memory_span_t::size"] | ||
| [::std::mem::offset_of!(const_memory_span_t, size) - 8usize]; | ||
| }; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct RustObj { | ||
| pub _base: v8_Object_Wrappable, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of RustObj"][::std::mem::size_of::<RustObj>() - 8usize]; | ||
| ["Alignment of RustObj"][::std::mem::align_of::<RustObj>() - 8usize]; | ||
| }; | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZN7RustObjD1Ev"] | ||
| pub fn RustObj_RustObj_destructor(this: *mut RustObj); | ||
| } | ||
| unsafe extern "C" { | ||
| #[link_name = "\u{1}_ZNK7RustObj20GetHumanReadableNameEv"] | ||
| pub fn RustObj_GetHumanReadableName( | ||
| this: *mut ::std::os::raw::c_void, | ||
| ) -> *const ::std::os::raw::c_char; | ||
| } | ||
| #[doc = " Types defined here will be compiled with bindgen\n and made available in `crate::binding` in rust."] | ||
| pub const v8__ScriptOrigin_SIZE: usize = 40; | ||
| pub const cppgc__Member_SIZE: usize = 4; | ||
| pub const cppgc__WeakMember_SIZE: usize = 4; | ||
| pub const v8__TracedReference_SIZE: usize = 8; | ||
| pub const v8__Eternal_SIZE: usize = 8; | ||
| pub const v8__String__ValueView_SIZE: usize = 32; | ||
| pub const v8__String__kMaxLength: ::std::os::raw::c_int = 536870888; | ||
| pub const v8__String__WriteFlags__kNullTerminate: ::std::os::raw::c_int = 1; | ||
| pub const v8__String__WriteFlags__kReplaceInvalidUtf8: ::std::os::raw::c_int = | ||
| 2; | ||
| pub const v8__TypedArray__kMaxByteLength: usize = 9007199254740991; | ||
| pub const v8__TYPED_ARRAY_MAX_SIZE_IN_HEAP: usize = 0; | ||
| pub const v8__Uint8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint8ClampedArray__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Int8Array__kMaxLength: usize = 9007199254740991; | ||
| pub const v8__Uint16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Int16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Uint32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Int32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float16Array__kMaxLength: usize = 4503599627370495; | ||
| pub const v8__Float32Array__kMaxLength: usize = 2251799813685247; | ||
| pub const v8__Float64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigUint64Array__kMaxLength: usize = 1125899906842623; | ||
| pub const v8__BigInt64Array__kMaxLength: usize = 1125899906842623; | ||
| pub type v8__CFunction = v8_CFunction; | ||
| pub type v8__CFunctionInfo = v8_CFunctionInfo; | ||
| pub type v8__FastOneByteString = v8_FastOneByteString; | ||
| #[doc = " Features reported via the SetUseCounterCallback callback. Do not change\n assigned numbers of existing items; add new features to the end of this\n list.\n Dead features can be marked `V8_DEPRECATE_SOON`, then `V8_DEPRECATED`, and\n then finally be renamed to `kOBSOLETE_...` to stop embedders from using\n them."] | ||
| pub use self::v8_Isolate_UseCounterFeature as v8__Isolate__UseCounterFeature; | ||
| pub type v8__String__WriteFlags = v8_String_WriteFlags; | ||
| #[doc = " Import phases in import requests."] | ||
| pub use self::v8_ModuleImportPhase as v8__ModuleImportPhase; | ||
| #[doc = " Collection of V8 heap information.\n\n Instances of this class can be passed to v8::Isolate::GetHeapStatistics to\n get heap statistics from V8."] | ||
| pub type v8__HeapStatistics = v8_HeapStatistics; | ||
| pub type v8__HeapSpaceStatistics = v8_HeapSpaceStatistics; | ||
| pub type v8__HeapCodeStatistics = v8_HeapCodeStatistics; | ||
| #[doc = " GCCallbackFlags is used to notify additional information about the GC\n callback.\n - kGCCallbackFlagConstructRetainedObjectInfos: The GC callback is for\n constructing retained object infos.\n - kGCCallbackFlagForced: The GC callback is for a forced GC for testing.\n - kGCCallbackFlagSynchronousPhantomCallbackProcessing: The GC callback\n is called synchronously without getting posted to an idle task.\n - kGCCallbackFlagCollectAllAvailableGarbage: The GC callback is called\n in a phase where V8 is trying to collect all available garbage\n (e.g., handling a low memory notification).\n - kGCCallbackScheduleIdleGarbageCollection: The GC callback is called to\n trigger an idle garbage collection."] | ||
| pub use self::v8_GCCallbackFlags as v8__GCCallbackFlags; | ||
| #[doc = " Applications can register callback functions which will be called before and\n after certain garbage collection operations. Allocations are not allowed in\n the callback functions, you therefore cannot manipulate objects (set or\n delete properties for example) since it is possible such operations will\n result in the allocation of objects.\n TODO(v8:12612): Deprecate kGCTypeMinorMarkSweep after updating blink."] | ||
| pub use self::v8_GCType as v8__GCType; | ||
| #[doc = " Interceptor callbacks use this value to indicate whether the request was\n intercepted or not.\n\n The values for constants and type are chosen this way for better\n performance."] | ||
| pub use self::v8_Intercepted as v8__Intercepted; | ||
| pub const v8__MAJOR_VERSION: u32 = 15; | ||
| pub const v8__MINOR_VERSION: u32 = 2; | ||
| pub const v8__BUILD_NUMBER: u32 = 124; | ||
| pub const v8__PATCH_LEVEL: u32 = 1; | ||
| pub const v8__VERSION_STRING: &::std::ffi::CStr = c"15.2.124.1-rusty"; | ||
| #[repr(C)] | ||
| #[derive(Debug)] | ||
| pub struct ExternalConstOneByteStringResource { | ||
| pub _base: v8_String_ExternalOneByteStringResource, | ||
| pub _length: ::std::os::raw::c_int, | ||
| } | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| ["Size of ExternalConstOneByteStringResource"] | ||
| [::std::mem::size_of::<ExternalConstOneByteStringResource>() - 24usize]; | ||
| ["Alignment of ExternalConstOneByteStringResource"] | ||
| [::std::mem::align_of::<ExternalConstOneByteStringResource>() - 8usize]; | ||
| ["Offset of field: ExternalConstOneByteStringResource::_length"][::std::mem::offset_of!( | ||
| ExternalConstOneByteStringResource, | ||
| _length | ||
| ) - 16usize]; | ||
| }; | ||
| #[allow(clippy::unnecessary_operation, clippy::identity_op)] | ||
| const _: () = { | ||
| [ | ||
| "Size of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::size_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| [ | ||
| "Align of template specialization: cppgc_GarbageCollected_open0_v8_Object_Wrappable_close0", | ||
| ][::std::mem::align_of::<cppgc_GarbageCollected>() - 1usize]; | ||
| }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display