[−][src]Struct wasmer_vm::VMOffsets
This class computes offsets to fields within VMContext and other
related structs that JIT code accesses directly.
Fields
pointer_size: u8The size in bytes of a pointer on the target.
num_signature_ids: u32The number of signature declarations in the module.
num_imported_functions: u32The number of imported functions in the module.
num_imported_tables: u32The number of imported tables in the module.
num_imported_memories: u32The number of imported memories in the module.
num_imported_globals: u32The number of imported globals in the module.
num_local_tables: u32The number of defined tables in the module.
num_local_memories: u32The number of defined memories in the module.
num_local_globals: u32The number of defined globals in the module.
Implementations
impl VMOffsets[src]
pub fn new(pointer_size: u8, module: &ModuleInfo) -> Self[src]
Return a new VMOffsets instance, for a given pointer size.
pub fn new_for_trampolines(pointer_size: u8) -> Self[src]
Return a new VMOffsets instance, for a given pointer size
skipping the ModuleInfo.
Note: This should only when generating code for trampolines.
impl VMOffsets[src]
Offsets for VMFunctionImport.
pub const fn vmfunction_import_body(&self) -> u8[src]
The offset of the body field.
pub const fn vmfunction_import_vmctx(&self) -> u8[src]
The offset of the vmctx field.
pub const fn size_of_vmfunction_import(&self) -> u8[src]
Return the size of VMFunctionImport.
impl VMOffsets[src]
Offsets for VMDynamicFunctionContext.
pub const fn vmdynamicfunction_import_context_address(&self) -> u8[src]
The offset of the address field.
pub const fn vmdynamicfunction_import_context_ctx(&self) -> u8[src]
The offset of the ctx field.
pub const fn size_of_vmdynamicfunction_import_context(&self) -> u8[src]
Return the size of VMDynamicFunctionContext.
impl VMOffsets[src]
Offsets for *const VMFunctionBody.
pub const fn size_of_vmfunction_body_ptr(&self) -> u8[src]
The size of the current_elements field.
impl VMOffsets[src]
Offsets for VMTableImport.
pub const fn vmtable_import_definition(&self) -> u8[src]
The offset of the definition field.
pub const fn vmtable_import_from(&self) -> u8[src]
The offset of the from field.
pub const fn size_of_vmtable_import(&self) -> u8[src]
Return the size of VMTableImport.
impl VMOffsets[src]
Offsets for VMTableDefinition.
pub const fn vmtable_definition_base(&self) -> u8[src]
The offset of the base field.
pub const fn vmtable_definition_current_elements(&self) -> u8[src]
The offset of the current_elements field.
pub const fn size_of_vmtable_definition_current_elements(&self) -> u8[src]
The size of the current_elements field.
pub const fn size_of_vmtable_definition(&self) -> u8[src]
Return the size of VMTableDefinition.
impl VMOffsets[src]
Offsets for VMMemoryImport.
pub const fn vmmemory_import_definition(&self) -> u8[src]
The offset of the from field.
pub const fn vmmemory_import_from(&self) -> u8[src]
The offset of the from field.
pub const fn size_of_vmmemory_import(&self) -> u8[src]
Return the size of VMMemoryImport.
impl VMOffsets[src]
Offsets for VMMemoryDefinition.
pub const fn vmmemory_definition_base(&self) -> u8[src]
The offset of the base field.
pub const fn vmmemory_definition_current_length(&self) -> u8[src]
The offset of the current_length field.
pub const fn size_of_vmmemory_definition_current_length(&self) -> u8[src]
The size of the current_length field.
pub const fn size_of_vmmemory_definition(&self) -> u8[src]
Return the size of VMMemoryDefinition.
impl VMOffsets[src]
Offsets for VMGlobalImport.
pub const fn vmglobal_import_definition(&self) -> u8[src]
The offset of the definition field.
pub const fn vmglobal_import_from(&self) -> u8[src]
The offset of the from field.
pub const fn size_of_vmglobal_import(&self) -> u8[src]
Return the size of VMGlobalImport.
impl VMOffsets[src]
Offsets for a non-null pointer to a VMGlobalDefinition used as a local global.
pub const fn size_of_vmglobal_local(&self) -> u8[src]
Return the size of a pointer to a VMGlobalDefinition;
The underlying global itself is the size of the largest value type (i.e. a V128), however the size of this type is just the size of a pointer.
impl VMOffsets[src]
Offsets for VMSharedSignatureIndex.
pub const fn size_of_vmshared_signature_index(&self) -> u8[src]
Return the size of VMSharedSignatureIndex.
impl VMOffsets[src]
Offsets for VMCallerCheckedAnyfunc.
pub const fn vmcaller_checked_anyfunc_func_ptr(&self) -> u8[src]
The offset of the func_ptr field.
pub const fn vmcaller_checked_anyfunc_type_index(&self) -> u8[src]
The offset of the type_index field.
pub const fn vmcaller_checked_anyfunc_vmctx(&self) -> u8[src]
The offset of the vmctx field.
pub const fn size_of_vmcaller_checked_anyfunc(&self) -> u8[src]
Return the size of VMCallerCheckedAnyfunc.
impl VMOffsets[src]
Offsets for VMContext.
pub fn vmctx_signature_ids_begin(&self) -> u32[src]
The offset of the signature_ids array.
pub fn vmctx_imported_functions_begin(&self) -> u32[src]
The offset of the tables array.
pub fn vmctx_imported_tables_begin(&self) -> u32[src]
The offset of the tables array.
pub fn vmctx_imported_memories_begin(&self) -> u32[src]
The offset of the memories array.
pub fn vmctx_imported_globals_begin(&self) -> u32[src]
The offset of the globals array.
pub fn vmctx_tables_begin(&self) -> u32[src]
The offset of the tables array.
pub fn vmctx_memories_begin(&self) -> u32[src]
The offset of the memories array.
pub fn vmctx_globals_begin(&self) -> u32[src]
The offset of the globals array.
pub fn vmctx_builtin_functions_begin(&self) -> u32[src]
The offset of the builtin functions array.
pub fn size_of_vmctx(&self) -> u32[src]
Return the size of the VMContext allocation.
pub fn vmctx_vmshared_signature_id(&self, index: SignatureIndex) -> u32[src]
Return the offset to VMSharedSignatureIndex index index.
pub fn vmctx_vmfunction_import(&self, index: FunctionIndex) -> u32[src]
Return the offset to VMFunctionImport index index.
pub fn vmctx_vmtable_import(&self, index: TableIndex) -> u32[src]
Return the offset to VMTableImport index index.
pub fn vmctx_vmmemory_import(&self, index: MemoryIndex) -> u32[src]
Return the offset to VMMemoryImport index index.
pub fn vmctx_vmglobal_import(&self, index: GlobalIndex) -> u32[src]
Return the offset to VMGlobalImport index index.
pub fn vmctx_vmtable_definition(&self, index: LocalTableIndex) -> u32[src]
Return the offset to VMTableDefinition index index.
pub fn vmctx_vmmemory_definition(&self, index: LocalMemoryIndex) -> u32[src]
Return the offset to VMMemoryDefinition index index.
pub fn vmctx_vmglobal_definition(&self, index: LocalGlobalIndex) -> u32[src]
Return the offset to the VMGlobalDefinition index index.
pub fn vmctx_vmfunction_import_body(&self, index: FunctionIndex) -> u32[src]
Return the offset to the body field in *const VMFunctionBody index index.
pub fn vmctx_vmfunction_import_vmctx(&self, index: FunctionIndex) -> u32[src]
Return the offset to the vmctx field in *const VMFunctionBody index index.
pub fn vmctx_vmtable_import_definition(&self, index: TableIndex) -> u32[src]
Return the offset to the definition field in VMTableImport index index.
pub fn vmctx_vmtable_definition_base(&self, index: LocalTableIndex) -> u32[src]
Return the offset to the base field in VMTableDefinition index index.
pub fn vmctx_vmtable_definition_current_elements(
&self,
index: LocalTableIndex
) -> u32[src]
&self,
index: LocalTableIndex
) -> u32
Return the offset to the current_elements field in VMTableDefinition index index.
pub fn vmctx_vmmemory_import_definition(&self, index: MemoryIndex) -> u32[src]
Return the offset to the from field in VMMemoryImport index index.
pub fn vmctx_vmmemory_import_from(&self, index: MemoryIndex) -> u32[src]
Return the offset to the vmctx field in VMMemoryImport index index.
pub fn vmctx_vmmemory_definition_base(&self, index: LocalMemoryIndex) -> u32[src]
Return the offset to the base field in VMMemoryDefinition index index.
pub fn vmctx_vmmemory_definition_current_length(
&self,
index: LocalMemoryIndex
) -> u32[src]
&self,
index: LocalMemoryIndex
) -> u32
Return the offset to the current_length field in VMMemoryDefinition index index.
pub fn vmctx_vmglobal_import_definition(&self, index: GlobalIndex) -> u32[src]
Return the offset to the from field in VMGlobalImport index index.
pub fn vmctx_builtin_function(&self, index: VMBuiltinFunctionIndex) -> u32[src]
Return the offset to builtin function in VMBuiltinFunctionsArray index index.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for VMOffsets[src]
impl Send for VMOffsets[src]
impl Sync for VMOffsets[src]
impl Unpin for VMOffsets[src]
impl UnwindSafe for VMOffsets[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,