|
|
| Val (int32_t i32) |
| | Creates a new i32 WebAssembly value.
|
| |
|
| Val (int64_t i64) |
| | Creates a new i64 WebAssembly value.
|
| |
|
| Val (float f32) |
| | Creates a new f32 WebAssembly value.
|
| |
|
| Val (double f64) |
| | Creates a new f64 WebAssembly value.
|
| |
|
| Val (const V128 &v128) |
| | Creates a new v128 WebAssembly value.
|
| |
|
| Val (std::optional< Func > func) |
| | Creates a new funcref WebAssembly value.
|
| |
|
| Val (Func func) |
| | Creates a new funcref WebAssembly value which is not ref.null func.
|
| |
|
| Val (std::optional< ExternRef > ptr) |
| | Creates a new externref value.
|
| |
| | Val (ExternRef ptr) |
| |
|
ValKind | kind () const |
| | Returns the kind of value that this value has.
|
| |
| int32_t | i32 () const |
| |
| int64_t | i64 () const |
| |
| float | f32 () const |
| |
| double | f64 () const |
| |
| V128 | v128 () const |
| |
| std::optional< ExternRef > | externref (Store::Context cx) const |
| |
| std::optional< Func > | funcref () const |
| |
|
void | unroot (Store::Context cx) |
| | Unroots any GC references this Val points to within the cx provided.
|
| |
Representation of a generic WebAssembly value.
This is roughly equivalent to a tagged union of all possible WebAssembly values. This is later used as an argument with functions, globals, tables, etc.
Note that a Val can represent owned GC pointers. In this case the unroot method must be used to ensure that they can later be garbage-collected.