diff options
| author | Henry Gressmann <mail@henrygressmann.de> | 2024-01-15 23:28:40 +0100 |
|---|---|---|
| committer | Henry Gressmann <mail@henrygressmann.de> | 2024-01-15 23:28:40 +0100 |
| commit | 1a97fa744e9f3536b437e484270de327c3b278fc (patch) | |
| tree | 40b44c77e15f17198841d1c483f0a3a2e66de560 /crates/parser/src | |
| parent | 9c82f366fc1e0ae8088660abe51d3708d42132f8 (diff) | |
feat: element instantiation
Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
Diffstat (limited to 'crates/parser/src')
| -rw-r--r-- | crates/parser/src/conversion.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/crates/parser/src/conversion.rs b/crates/parser/src/conversion.rs index 7b36dcd..b1427c0 100644 --- a/crates/parser/src/conversion.rs +++ b/crates/parser/src/conversion.rs @@ -307,7 +307,7 @@ pub fn process_const_operator(op: wasmparser::Operator) -> Result<ConstInstructi wasmparser::Operator::F64Const { value } => Ok(ConstInstruction::F64Const(f64::from_bits(value.bits()))), // TODO: check if this is correct wasmparser::Operator::GlobalGet { global_index } => Ok(ConstInstruction::GlobalGet(global_index)), op => Err(crate::ParseError::UnsupportedOperator(format!( - "Unsupported instruction: {:?}", + "Unsupported const instruction: {:?}", op ))), } @@ -587,6 +587,16 @@ pub fn process_operators<'a>( I64TruncSatF32U => Instruction::I64TruncSatF32U, I64TruncSatF64S => Instruction::I64TruncSatF64S, I64TruncSatF64U => Instruction::I64TruncSatF64U, + TableGet { table } => Instruction::TableGet(table), + TableSet { table } => Instruction::TableSet(table), + TableInit { table, elem_index } => Instruction::TableInit(table, elem_index), + TableCopy { src_table, dst_table } => Instruction::TableCopy { + from: src_table, + to: dst_table, + }, + TableGrow { table } => Instruction::TableGrow(table), + TableSize { table } => Instruction::TableSize(table), + TableFill { table } => Instruction::TableFill(table), op => { log::error!("Unsupported instruction: {:?}", op); return Err(crate::ParseError::UnsupportedOperator(format!( |
