pub struct VMOffsets<P> {
    pub ptr: P,
    pub num_imported_functions: u32,
    pub num_imported_tables: u32,
    pub num_imported_memories: u32,
    pub num_imported_globals: u32,
    pub num_defined_tables: u32,
    pub num_defined_memories: u32,
    pub num_defined_globals: u32,
    pub num_escaped_funcs: u32,
    /* private fields */
}
Expand description

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

Fields

ptr: P

The size in bytes of a pointer on the target.

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_defined_tables: u32

The number of defined tables in the module.

num_defined_memories: u32

The number of defined memories in the module.

num_defined_globals: u32

The number of defined globals in the module.

num_escaped_funcs: u32

The number of escaped functions in the module, the size of the anyfuncs array.

Implementations

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

Returns the size, in bytes, of the target

Returns an iterator which provides a human readable description and a byte size. The iterator returned will iterate over the bytes allocated to the entire VMOffsets structure to explain where each byte size is coming from.

The offset of the body field.

The offset of the vmctx field.

Return the size of VMFunctionImport.

Offsets for *const VMFunctionBody.

The size of the current_elements field.

Offsets for VMTableImport.

The offset of the from field.

The offset of the vmctx 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 vmctx field.

Return the size of VMMemoryImport.

Offsets for VMMemoryDefinition.

The offset of the base field.

The offset of the current_length field.

Return the size of VMMemoryDefinition.

Offsets for VMGlobalImport.

The offset of the from field.

Return the size of VMGlobalImport.

Offsets for VMGlobalDefinition.

Return the size of VMGlobalDefinition; this is the size of the largest value type (i.e. a V128).

Offsets for VMSharedSignatureIndex.

Return the size of VMSharedSignatureIndex.

Offsets for VMRuntimeLimits.

Return the offset of the stack_limit field of VMRuntimeLimits

Return the offset of the fuel_consumed field of VMRuntimeLimits

Return the offset of the epoch_deadline field of VMRuntimeLimits

Offsets for VMContext.

Return the offset to the magic value in this VMContext.

Return the offset to the VMRuntimeLimits structure

Return the offset to the *const AtomicU64 epoch-counter pointer.

The offset of the *mut VMExternRefActivationsTable member.

The offset of the *const dyn Store member.

The offset of the signature_ids array pointer.

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 anyfuncs array.

The offset of the builtin functions array.

Return the size of the VMContext allocation.

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 VMCallerCheckedAnyfunc for the given function index (either imported or defined).

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 from 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.

Offsets for VMExternData.

Return the offset for VMExternData::ref_count.

Offsets for VMExternRefActivationsTable.

Return the offset for VMExternRefActivationsTable::next.

Return the offset for VMExternRefActivationsTable::end.

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

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

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

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.