Module vmcontext

Source
Expand description

This file declares VMContext and several related structs which contain fields that compiled wasm code accesses directly.

Structs§

VMBuiltinFunctionsArray
An array that stores addresses of builtin functions. We translate code to use indirect calls. This way, we don’t have to patch the code.
VMCallerCheckedAnyfunc
The VM caller-checked “anyfunc” record, for caller-side signature checking. It consists of the actual function pointer and a signature id to be checked by the caller.
VMContext
The VM “context”, which is pointed to by the vmctx arg in the compiler. This has information about globals, memories, tables, and other runtime state associated with the current instance.
VMDynamicFunctionContext
The VMDynamicFunctionContext is the context that dynamic functions will receive when called (rather than vmctx). A dynamic function is a function for which we don’t know the signature until runtime.
VMFunctionImport
An imported function.
VMGlobalDefinition
The storage for a WebAssembly global defined within the instance.
VMGlobalImport
The fields compiled code needs to access to utilize a WebAssembly global variable imported from another instance.
VMMemoryDefinition
The fields compiled code needs to access to utilize a WebAssembly linear memory defined within the instance, namely the start address and the size in bytes.
VMMemoryImport
The fields compiled code needs to access to utilize a WebAssembly linear memory imported from another instance.
VMSharedSignatureIndex
An index into the shared signature registry, usable for checking signatures at indirect calls.
VMSharedTagIndex
A tag index, unique within the Store in which the instance was created. Usable for translating module-local tag indices to store-unique ones.
VMTableDefinition
The fields compiled code needs to access to utilize a WebAssembly table defined within the instance.
VMTableImport
The fields compiled code needs to access to utilize a WebAssembly table imported from another instance.

Enums§

VMFunctionKind
A function kind is a calling convention into and out of wasm code.

Functions§

memory32_atomic_check32 🔒
Perform the memory32.atomic.check32 operation for the memory. Return 0 if same, 1 if different
memory32_atomic_check64 🔒
Perform the memory32.atomic.check64 operation for the memory. Return 0 if same, 1 if different
memory_copy 🔒
Do an unsynchronized, non-atomic memory.copy for the memory.
memory_fill 🔒
Perform the memory.fill operation for the memory in an unsynchronized, non-atomic way.

Type Aliases§

VMTrampoline
The type for tramplines in the VM.

Unions§

VMFunctionContext
Union representing the first parameter passed when calling a function.