diff options
| author | Henry <mail@henrygressmann.de> | 2023-12-28 16:47:35 +0100 |
|---|---|---|
| committer | Henry <mail@henrygressmann.de> | 2023-12-28 16:47:35 +0100 |
| commit | 28b8a556b51aecf9eaed92c1fc3e648e4efe7572 (patch) | |
| tree | 2628eab536c15839989d21b4ecfa6628de08ab22 /crates/types | |
| parent | 1041182f6ed3376eb62f4269c41cb16a47ab8ad0 (diff) | |
chore: add ref instructions
Signed-off-by: Henry <mail@henrygressmann.de>
Diffstat (limited to 'crates/types')
| -rw-r--r-- | crates/types/src/instructions.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/crates/types/src/instructions.rs b/crates/types/src/instructions.rs index 95fddc5..535b727 100644 --- a/crates/types/src/instructions.rs +++ b/crates/types/src/instructions.rs @@ -1,3 +1,5 @@ +use crate::MemAddr; + use super::{FuncAddr, GlobalAddr, LabelAddr, LocalAddr, TableAddr, TypeAddr, ValType}; #[derive(Debug, Copy, Clone, PartialEq, Eq)] @@ -26,6 +28,8 @@ pub enum ConstInstruction { F32Const(f32), F64Const(f64), GlobalGet(GlobalAddr), + RefNull(ValType), + RefFunc(FuncAddr), } /// A WebAssembly Instruction @@ -99,8 +103,8 @@ pub enum Instruction { I64Store8(MemArg), I64Store16(MemArg), I64Store32(MemArg), - MemorySize, - MemoryGrow, + MemorySize(MemAddr, u8), + MemoryGrow(MemAddr, u8), // Constants I32Const(i32), @@ -108,6 +112,11 @@ pub enum Instruction { F32Const(f32), F64Const(f64), + // Reference Types + RefNull(ValType), + RefFunc(FuncAddr), + RefIsNull, + // Numeric Instructions // See <https://webassembly.github.io/spec/core/binary/instructions.html#numeric-instructions> I32Eqz, |
