Expand description
This file declares VMContext
and several related structs which contain
fields that compiled wasm code accesses directly.
Structs§
- VMBuiltin
Functions Array - 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.
- VMCaller
Checked Anyfunc - 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. - VMDynamic
Function Context - The
VMDynamicFunctionContext
is the context that dynamic functions will receive when called (rather thanvmctx
). A dynamic function is a function for which we don’t know the signature until runtime. - VMFunction
Import - An imported function.
- VMGlobal
Definition - The storage for a WebAssembly global defined within the instance.
- VMGlobal
Import - The fields compiled code needs to access to utilize a WebAssembly global variable imported from another instance.
- VMMemory
Definition - 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.
- VMMemory
Import - The fields compiled code needs to access to utilize a WebAssembly linear memory imported from another instance.
- VMShared
Signature Index - An index into the shared signature registry, usable for checking signatures at indirect calls.
- VMShared
TagIndex - A tag index, unique within the Store in which the instance was created. Usable for translating module-local tag indices to store-unique ones.
- VMTable
Definition - The fields compiled code needs to access to utilize a WebAssembly table defined within the instance.
- VMTable
Import - The fields compiled code needs to access to utilize a WebAssembly table imported from another instance.
Enums§
- VMFunction
Kind - 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§
- VMFunction
Context - Union representing the first parameter passed when calling a function.