WasmValue Struct
A WebAssembly value (https://webassembly.github.io/spec/core/exec/runtime.html#values). The references are null (a null reference of any type), a WasmFunction, a WasmHostReference (a value of the host), a WasmI31Reference, a WasmGcObject or a WasmExceptionReference.
public readonly struct WasmValue : IEquatable<WasmValue>- Implements
Properties
| Name | Description |
|---|---|
| F32 | Gets the value of an f32. |
| F32Bits | Gets the bits of an f32 value (the payload of a NaN is preserved). |
| F64 | Gets the value of an f64. |
| F64Bits | Gets the bits of an f64 value (the payload of a NaN is preserved). |
| I32 | Gets the value of an i32. |
| I64 | Gets the value of an i64. |
| Kind | Gets the kind of the value. |
| Null | Gets a null reference. |
| Reference | Gets the referenced object of a reference, or null for a null reference. |
| V128High | Gets the high 64 bits of a v128 value. |
| V128Low | Gets the low 64 bits of a v128 value. |
F32
WasmValue.csF32Bits
WasmValue.csF64
WasmValue.csF64Bits
WasmValue.csI32
WasmValue.csI64
WasmValue.csKind
WasmValue.csNull
WasmValue.csReference
WasmValue.csV128High
WasmValue.csV128Low
WasmValue.csMethods
| Name | Description |
|---|---|
| Default(WasmValueType) | Returns the default value of a type (https://webassembly.github.io/spec/core/exec/runtime.html#default-val): zero, or a null reference. |
| Equals(WasmValue) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| FromF32(float) | Creates an f32 value. |
| FromF32Bits(int) | Creates an f32 value from its bits. |
| FromF64(double) | Creates an f64 value. |
| FromF64Bits(long) | Creates an f64 value from its bits. |
| FromHostValue(object?) | Creates an externref to a value of the host, or a null reference when value is null. |
| FromI32(int) | Creates an i32 value. |
| FromI64(long) | Creates an i64 value. |
| FromReference(object?) | Creates a reference, or a null reference when reference is null: a WasmFunction, a WasmHostReference, a WasmI31Reference, a WasmGcObject or a WasmExceptionReference. |
| FromV128(long, long) | Creates a v128 value. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the fully qualified type name of this instance. |
Default(WasmValueType)
WasmValue.csReturns the default value of a type (https://webassembly.github.io/spec/core/exec/runtime.html#default-val): zero, or a null reference.
public static WasmValue Default(WasmValueType type)FromF32(float)
WasmValue.csFromF32Bits(int)
WasmValue.csFromF64(double)
WasmValue.csFromF64Bits(long)
WasmValue.csFromHostValue(object?)
WasmValue.csFromI32(int)
WasmValue.csFromI64(long)
WasmValue.csFromReference(object?)
WasmValue.csCreates a reference, or a null reference when reference is null: a WasmFunction, a WasmHostReference, a WasmI31Reference, a WasmGcObject or a WasmExceptionReference.
FromV128(long, long)
WasmValue.csGetHashCode()
WasmValue.csToString()
WasmValue.csOperators
| Name | Description |
|---|---|
| operator ==(WasmValue, WasmValue) | Compares two values: the bits of the numbers, and the identity of the references. |
| operator !=(WasmValue, WasmValue) | Compares two values: the bits of the numbers, and the identity of the references. |