|
|
| 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 (std::optional< AnyRef > ptr) |
| | Creates a new anyref value.
|
| |
| | Val (ExternRef ptr) |
| |
| | Val (AnyRef ptr) |
| |
|
| Val (const Val &other) |
| | Copy constructor to clone other.
|
| |
|
Val & | operator= (const Val &other) |
| | Copy assignment to clone from other.
|
| |
|
| Val (Val &&other) |
| | Move constructor to move the contents of other.
|
| |
|
Val & | operator= (Val &&other) |
| | Move assignment to move the contents of other.
|
| |
|
| ~Val () |
| | Unroots the values in val, if any.
|
| |
|
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 () const |
| |
| std::optional< AnyRef > | anyref () const |
| |
| std::optional< Func > | funcref () const |
| |
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.