Struct wasmer_vm::VMOffsets[][src]

pub struct VMOffsets {
    pub pointer_size: u8,
    pub num_signature_ids: u32,
    pub num_imported_functions: u32,
    pub num_imported_tables: u32,
    pub num_imported_memories: u32,
    pub num_imported_globals: u32,
    pub num_local_tables: u32,
    pub num_local_memories: u32,
    pub num_local_globals: u32,
    pub has_trap_handlers: bool,
}
Expand description

This class computes offsets to fields within VMContext and other related structs that JIT code accesses directly.

Fields

pointer_size: u8

The size in bytes of a pointer on the target.

num_signature_ids: u32

The number of signature declarations in the module.

num_imported_functions: u32

The number of imported functions in the module.

num_imported_tables: u32

The number of imported tables in the module.

num_imported_memories: u32

The number of imported memories in the module.

num_imported_globals: u32

The number of imported globals in the module.

num_local_tables: u32

The number of defined tables in the module.

num_local_memories: u32

The number of defined memories in the module.

num_local_globals: u32

The number of defined globals in the module.

has_trap_handlers: bool

If the module has trap handler.

Implementations

Return a new VMOffsets instance, for a given pointer size.

Return a new VMOffsets instance, for a given pointer size skipping the ModuleInfo.

Note: This should only when generating code for trampolines.

Offsets for VMFunctionImport.

The offset of the body field.

The offset of the vmctx field.

Return the size of VMFunctionImport.

The offset of the address field.

The offset of the ctx field.

Return the size of VMDynamicFunctionContext.

Offsets for *const VMFunctionBody.

The size of the current_elements field.

Offsets for VMTableImport.

The offset of the definition field.

The offset of the from field.

Return the size of VMTableImport.

Offsets for VMTableDefinition.

The offset of the base field.

The offset of the current_elements field.

The size of the current_elements field.

Return the size of VMTableDefinition.

Offsets for VMMemoryImport.

The offset of the from field.

The offset of the from field.

Return the size of VMMemoryImport.

Offsets for VMMemoryDefinition.

The offset of the base field.

The offset of the current_length field.

The size of the current_length field.

Return the size of VMMemoryDefinition.

Offsets for VMGlobalImport.

The offset of the definition field.

The offset of the from field.

Return the size of VMGlobalImport.

Offsets for a non-null pointer to a VMGlobalDefinition used as a local global.

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.

Return the size of VMSharedSignatureIndex.

The offset of the func_ptr field.

The offset of the type_index field.

The offset of the vmctx field.

Return the size of VMCallerCheckedAnyfunc.

Offsets for VMFuncRef.

The offset to the pointer to the anyfunc inside the ref.

Return the size of VMFuncRef.

Offsets for VMContext.

The offset of the signature_ids array.

The offset of the tables array.

The offset of the tables array.

The offset of the memories array.

The offset of the globals array.

The offset of the tables array.

The offset of the memories array.

The offset of the globals array.

The offset of the builtin functions array.

The offset of the trap handler.

The offset of the gas limiter pointer.

Return the size of the VMContext allocation.

Return the offset to VMSharedSignatureIndex index index.

Return the offset to VMFunctionImport index index.

Return the offset to VMTableImport index index.

Return the offset to VMMemoryImport index index.

Return the offset to VMGlobalImport index index.

Return the offset to VMTableDefinition index index.

Return the offset to VMMemoryDefinition index index.

Return the offset to the VMGlobalDefinition index index.

Return the offset to the body field in *const VMFunctionBody index index.

Return the offset to the vmctx field in *const VMFunctionBody index index.

Return the offset to the definition field in VMTableImport index index.

Return the offset to the base field in VMTableDefinition index index.

Return the offset to the current_elements field in VMTableDefinition index index.

Return the offset to the from field in VMMemoryImport index index.

Return the offset to the vmctx field in VMMemoryImport index index.

Return the offset to the base field in VMMemoryDefinition index index.

Return the offset to the current_length field in VMMemoryDefinition index index.

Return the offset to the from field in VMGlobalImport index index.

Return the offset to builtin function in VMBuiltinFunctionsArray index index.

Return the offset to the trap handler.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the size of the referenced value in bytes. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type for metadata in pointers and references to Self.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.