Module wasmer_vm::vmcontext

source ·
Expand description

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

Structs§

  • 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.
  • 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.
  • 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.
  • 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.
  • An imported function.
  • The storage for a WebAssembly global defined within the instance.
  • The fields compiled code needs to access to utilize a WebAssembly global variable imported from another instance.
  • 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.
  • The fields compiled code needs to access to utilize a WebAssembly linear memory imported from another instance.
  • An index into the shared signature registry, usable for checking signatures at indirect calls.
  • The fields compiled code needs to access to utilize a WebAssembly table defined within the instance.
  • The fields compiled code needs to access to utilize a WebAssembly table imported from another instance.

Enums§

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

Functions§

  • Perform the memory32.atomic.check32 operation for the memory. Return 0 if same, 1 if different
  • 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§

Unions§

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